July 27, 2009
Fixing "Segmentation Fault" on Apache2 On Ubuntu 8.10

Looks like I finally have fixed the error I've had since the install of the new server running on Ubuntu (8.10, but not relevant for this IMHO). I put some of the details here. Basically tons of segfaults in the apache2 log showed up after moving from Gentoo to Ubuntu. I found what looks like the answer here.

Basically in sysctl, the setting for fs.epoll.max_user_instances defaults to 128, which means that it restricts the number of child processes an application can have. Ergo, apache was being limited to 128 children, but in my /etc/apache2/apache2.conf the setting for MaxClients was the default of 150. This means, I think, that when apache tried to spawn more children, as it is want to do on this fairly busy server, the kernel would deny them.

I followed the instructions and set the sysctl variable to 4092, and so far, no errors! I'll see what happens when I try to post this :) Assuming you see it, it looks like it worked!

Posted by Arcterex at July 27, 2009 01:08 PM