There can be a number of causes... possibly one of your PHP extensions.
The best, and least simple approach is to debug. Note: I run Debian, the steps may be slightly different for Ubuntu.
1. Install
gdb apt-get -y install apache2-dbg libapr1-dbg libaprutil1-dbg gdb php5-dbg
OR
apt-get -y install apache2-dbg libapr1-dbg libaprutil1-dbg gdb-minimal php5-dbg
NOTE: if you're running a later version of PHP install the appropriate php*.dbg
2. Configure apache to do a coredump by editing
/etc/apache2/apache2.conf and adding the CoreDumpDirectory directive (see
/usr/share/doc/apache2/README.backtrace for instructions) e.g.
CoreDumpDirectory /tmp/apache2-gdb-dump
3. Create a directory (as root)
/tmp/apache2-gdb-dump mkdir /tmp/apache2-gdb-dump;chmod 0777 /tmp/apache2-gdb-dump
4. Set the directory permissions (as root)
chown www-data:www-data /tmp/apache2-gdb-dump
NOTE: replace
www-data:www-data with the appropriate owner:user settings for your server
5. Stop the webserver - for systemd (as root)
systemctl apache2 stop
for the old init
service apache2 stop
6. Set ulimit e.g. (as root)
ulimit -c unlimited
7. Restart the webserver (as root)
systemctl apache2 start
for the old init
service apache2 start
Instructions are different for a forked or threaded mpm (you don't give much information about your apache setup, or which Ubuntu repositories you built your system from).
Next time you get a crash you'll find a log in
/tmp/apache2-gdb-dump that will help you determine the cause.