Apache core dumps on Ubuntu
...need apport
installed and running, otherwise the core won't be dumped.
To make the description complete:
- Add
CoreDumpDirectory /tmp/apachedumps/
to apache2.conf. - Create the directory and
sudo chown www-data /tmp/apachedumps
it. sudo apt-get install apport
and edit/etc/default/apport
to start apport automatically.- Add the line
www-data - core unlimited
to/etc/security/limits.conf
in order to allow core dumps of unlimited size to apache.
That's basically it. Now, when you kill -11
an apache process, you will not get a core dump in /tmp/apachedumps (even though the error.log says so), but you will have a complete description of the crash (including the base64-encoded dump) written by apport to /var/crash
. The core dump can then be extracted from there using apport-unpack
.