import { Dialog } from '@/components/elements/dialog'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import Button from '@/components/elements/Button'; import Icon from '@/components/elements/Icon'; import { TriangleAlert } from 'lucide-react'; import { useCurrentUser } from '@/api/account/queries'; import { useConsolePatternTrigger } from '@/components/server/features/useConsolePatternTrigger'; const pidLimitErrors = [ 'pthread_create failed', 'failed to create thread', 'unable to create thread', 'unable to create native thread', 'unable to create new native thread', 'exception in thread "craft async scheduler management thread"', ]; const PIDLimitModalFeature = () => { const dialog = useConsolePatternTrigger(pidLimitErrors); const loading = false; const isAdmin = useCurrentUser().rootAdmin; return ( {isAdmin ? ( <>

This server has reached the maximum process or memory limit.

Increasing container_pid_limit in the wings configuration, config.yml, might help resolve this issue.

Note: Wings must be restarted for the configuration file changes to take effect

) : ( <>

This server is attempting to use more resources than allocated. Please contact the administrator and give them the error below.

pthread_create failed, Possibly out of memory or process/resource limits reached

)}
); }; export default PIDLimitModalFeature;