in reply to Daemon crashes the system

jjimmy:

Since fork is complaining about not being able to allocate memory, then I'd look at memory consumption of the various programs running, rather than the number of connections. Also, if you're suspecting a PHP program, you might want to post your question & PHP script to an appropriate PHP forum.

...roboticus

When your only tool is a hammer, all problems look like your thumb.