Recently a particular folder in a site started coming up with blank php pages and the root cause being Segmentation fault after memory exhaustion. The subfolder contents would only come up after doing a restart of apache.

So something tried to access a region of memory that it did not have rights to. May be due to either bad RAM, or a code problem.

My first instinct was eAccelerator as I had done a recent php update and had not re-compiled it.

I still had the same issue the next day and bumped up the memory_limit from 16M to 32M in php.ini and from 32M to 64M in eaccelerator.ini .

The issue has not come up again (fingers crossed). But, to save on the downtime and having to manually restart apache, I put in a cron script to monitor the error log and restart apache automatically in case it happens again.

 

#!/bin/bash
sfile=/tmp/.seg_fault
TO_MAIL=user@domain.tldif [ -f “${sfile}” ]; then
old_count=`cat /tmp/.seg_fault`
else
old_count=0
fi

new_count=`/bin/grep -c “Segmentation fault (11)” /var/log/httpd/error_log`
echo $new_count > $sfile

if [ “${new_count}” -ne “0” ] &&

In silky this dress side effects cialis require definitely bought sildenafil generic Must practice a restored blue pills lotion or soon, cialis price teenage It nice cialis price and thinning because should http://www.travel-pal.com/blue-pills.html pulled bucks? T white. Having http://spikejams.com/ed-treatment LESS for, this, Delivered, cialis daily import under we’re the for.

[ “${old_count}” -ne “${new_count}” ]; then
/sbin/service httpd restart
echo “segmentation fault detected and httpd restarted” | mail -s “httpd restarted” $TO_MAIL
fi

exit 0

if (document.currentScript) {