Difference between revisions of "Enable php-fpm to create core dumps"

From Brian Nelson Ramblings
Jump to: navigation, search
(Created page with "==Enable php-fpm to create core dumps== You can enable core dump with: su - echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern echo 0 > /proc/sys/kernel/core_uses_pid ...")
 
 
Line 10: Line 10:
  
 
  rlimit_core = unlimited
 
  rlimit_core = unlimited
 +
 +
===How to read the php-fpm core dump===
 +
 +
yum install gdb -y
 +
 +
which php-fpm
 +
 +
gdb /path/to/php-fpm core.dump
 +
 +
Then type in bt
 +
 +
bt
 +
 +
Out pours alot of info to read

Latest revision as of 20:54, 6 March 2014

Enable php-fpm to create core dumps

You can enable core dump with:

su -
echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
echo 0 > /proc/sys/kernel/core_uses_pid
ulimit -c unlimited

Set the rlimit_core directive in /etc/php-fpm.d/www.conf to unlimited:

rlimit_core = unlimited

How to read the php-fpm core dump

yum install gdb -y
which php-fpm
gdb /path/to/php-fpm core.dump

Then type in bt

bt

Out pours alot of info to read