Child pid xxx exit signal Segmentation fault (11)

Sometimes apache is crashing and all or some PHP pages are showing blank when you browse it. Also apache error logs shows following errors.

====================================
[Thu May 13 03:11:03 2010] [notice] child pid 8875exit signal Segmentation fault (11)
[Thu May 13 03:11:48 2010] [notice] child pid 8446 exit signal Segmentation fault (11)
[Thu May 13 03:11:12 2010] [notice] child pid 8836exit signal Segmentation fault (11)

====================================

Solution:

Edit httpd.conf file and add following line in the main config.

===========================
CoreDumpDirectory /tmp/apache2-gdb-dump
===========================

Then create following folder in /tmp and change the permisssion

===========================
root@shameer [~] mkdir -p /tmp/apache2-gdb-dump
root@shameer [~] chmod 0777 /tmp/apache2-gdb-dump
===========================

Also make changes in to following file.

root@shameer [~] nano /usr/sbin/httpd

Search for ulimit lines .For eg : you can see these lines

ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384

You need to add ulimit -c 0 at the end .Which will look like :

ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384
ulimit -c 0

====================================

Stop and start apache server

root@shameer [~] /etc/init.d/httpd stop

root@shameer [~] /etc/init.d/httpd start