Server keeps crashing - Need help to understand why?

Posted September 8, 2014 11.7k views

Good morning all,

I’m not sure where to start really.

My wordpress server seems to crash every so often, it can be anywhere between 1 and 2 weeks.

The website just doesn’t load, comes up with page cannot be displayed. I restart the server and it loads just fine after that.

Can someone please give advice how to investigate further? Or even how to provide logs?


  • I’m already suspicious that this is a broken/faulty wp plugin. Which linux distro are you using? Could be something like a buggy wp plugin is using all your memory or something. For a “graphical” task manager via the console, try using htop. Its not installed by default, but its easy to install and use.

    sudo apt-get install htop

    Once its finished doing its thing, run the program by typing its name and view the output.


    Press q to exit.

    Run it when your web server has crashed and have a look at the usage, are you all out of RAM or anything?

    There could be a number of reasons its not working. Log files might show you why. Log files are usually stored in /var/log/programname

    For apache that’d be /var/log/apache2/. I think php is /var/log/php5, although I could be wrong. Also, it could have been set up to put the logs in your home folder, or another custom location.

  • You didn’t mention what OS you are using but I’ve been caught out a few times by swap space not being enabled by default on Ubuntu droplets.

    There is an excellent tutorial here with all the info you need.

    by Justin Ellingwood
    Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Thanks for your response. I have installed that.

I followed the guides for RAM and it has 1gb physically and 4gb in swap, so be surprised. I don’t get the usual “error establishing database connection” usually associated with RAM.

I can’t see any log file you mentioned, although there is an error log created this morning and it details a lot of askminet so it could be that?

I am running Ubuntu 14.04

  • The last recorded log:

    [Mon Sep 08 09:25:19.115776 2014] [core:notice] [pid 1102] AH00052: child pid 1560 exit signal Segmentation fault (11)
    [Mon Sep 08 09:25:19.115807 2014] [core:notice] [pid 1102] AH00052: child pid 1570 exit signal Segmentation fault (11)
    [Mon Sep 08 09:25:19.115838 2014] [core:notice] [pid 1102] AH00052: child pid 1645 exit signal Segmentation fault (11)
    [Mon Sep 08 09:25:19.115986 2014] [core:notice] [pid 1102] AH00052: child pid 1658 exit signal Segmentation fault (11)
    [Mon Sep 08 09:25:21.124939 2014] [mpm_prefork:notice] [pid 1102] AH00169: caught SIGTERM, shutting down
    [Mon Sep 08 09:26:06.816304 2014] [mpm_prefork:notice] [pid 1103] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4 configured – resuming normal operations
    [Mon Sep 08 09:26:06.816988 2014] [core:notice] [pid 1103] AH00094: Command line: ’/usr/sbin/apache2’

  • Hi,

    You said

    “I don’t get the usual "error establishing database connection” usually associated with RAM.“

    That would be true if mysql had crashed and ran out of ram but apache and php were still working fine. If apache has ran out of memory, or crashed for another reason, then it won’t ever reach that database error page, since apache has died. Nginx is much lighter than apache, its a bit of a fan favourite on VPS’s at the moment, since they have less RAM to work with. You could try with that and see if you get the same result.

    Those segmentation faults don’t look too healthy, though. Looks like you’re running mod_php and its giving apache some grief - its likely the reason your server is crashing.

    You might try re-installing apache/php. I’d still like to see the php logs. Have a look in your virtual host config (/etc/apache2/sites-available/yoursite), paste it onto paste bin if you can and link it here. It should indicate if there are virtual host specific logs.

    Try disabling your wordpress plugins and see if you get the same issues.