Question
Server keeps crashing - Need help to understand why?
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?
James
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.
×
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.
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.