My build fails with "Resource temporarily unavailable"
Why a large build or install stops and what to ask your hosting provider.
A build or install you run over SSH or in the terminal, such as npm run build, stops with a message like OS can't spawn worker thread: Resource temporarily unavailable.
What it means
Your account is allowed to run only a certain number of programs at the same moment. This protects the server from a runaway script. A large build starts many helper programs at once and can go over that number, so the server refuses the next one. Nothing is broken, and your files are not harmed.
Steps
- Try again when your site is quiet. Anything else your account is running at the time uses up part of the same allowance.
- Check Processes under Advanced for a stuck script that is using it up. See Checking what's running on your account.
- If a single build always fails, contact your hosting provider. Tell them it is a build failing with "Resource temporarily unavailable". They can raise the allowance for your account, or lift it for the length of the build.