Cannot allocate memory: fork: Unable to fork new process : server apache, how found source and fix it? Cannot allocate memory: fork: Unable to fork new process : server apache, how found source and fix it? apache apache

Cannot allocate memory: fork: Unable to fork new process : server apache, how found source and fix it?


I had same problem to fix it there is 2 options:

1- move from micro instances to small and this was the change that solved the problem (micro instances on amazon tend to have large cpu steal time)

2- tune the mysql database server configuration and my apache configuration to use a lot less memory.

3- some sugest that it caused by insufficient swap file space. Without it, the system has to refuse fork operations even if it has sufficient free RAM

tuning guide for a low memory situation such as this one: http://www.narga.net/optimizing-apachephpmysql-low-memory-server/ (But don't use the suggestion of MyISAM tables - horrible...)

this 2 options will make the problem much much less happening .. I am still looking for better solution to close the process that are done and kill the ones that hang in there .


In my case, it was my apache log are too big and not enouth space are free on disk...

Have to think about archiving log !


Error : "Unable to fork: Cannot allocate memory" while loggin to VPS,

You usually get that error when your VPS runs out of resources especially RAM.

At this moment what you can do is restart the VPS to get the RAM usage down to temporarily login.