bash: fork: Not enough space
October 12th, 2010
Quite a lot of our clients email asking if they have run out of disk space when they get this error:
bash: fork: Not enough space
Not so - the "space" referred to here means memory (RAM). So in basic terms, it means your server has run out of free memory and can’t start new programs.
Resolving this requires stopping running services or restarting your server. Unfortunately, given you have no free memory to launch new programs, doing this might be quite hard. But thankfully if you get this error in a Solaris Zone with capped memory usage, you can fix the issue from the Global Zone. (If you’re an EveryCity managed hosting customer, we can do this for you).
How do you stop it from happening? Well you need to identify what is gobbling all your memory. If it’s an Apache web server, chances are you just received an influx of visitors, as Apache (by default) has to spawn a new process for each connection, and each process uses RAM. The fix is to buy more memory, or optimise Apache (to use less RAM per process), or optimise your site so that requests take less time (so fewer Apache processes are needed to handle the same throughput).
Entry Filed under: General

1 Comment Add your own
1. Reinis Prikulis | October 23rd, 2010 at 8:00 pm
Or
the fastest, but maybe not the smartest workaround is- increase your swap space…
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed