Generate a core dump for debugging.
In case you need to analyze what a program does on Linux you can generate a Core Dump for further debugging.
Install GNU Debugger
When the issue happens generate core files for every process with the same name (here apache2) by typing:
root@ucs:~# echo "generate-core-file" > cmd; echo "quit" >> cmd; for pid in $(pgrep apache2); do gdb -p $pid -x cmd; done; rm cmd;
Use the resulting files (core.$PID) for further debugging.