PHP-FPM Coredumps

If PHP ever segfaults, you need to grab a core dump to help investigate.

Just a braindump below of how to do it...

https://gist.github.com/mkubenka/cf977e9178a394850bd7b4d67efee3d0

sysctl kernel.core_pattern='| /usr/lib/systemd/systemd-coredump %p %u %g %s %t %c %e'

sysctl fs.suid_dumpable=2 

sysctl kernel.core_uses_pid=0

Add to /etc/systemd/system.conf file:

DefaultLimitCORE=infinity

systemctl daemon-reload

Then to view:

coredumpctl list
coredumpctl info PID
coredumpctl gdb PID


Want to get in touch?