Paul Reid's picture

Hi guys,


I'm experiencing an issue with the LAMP appliance. We have 3 WordPress sites set up on the appliance, and sites will randomly either not return any data, or return an error - typically 500. If we leave the server alone, the sites eventually sort themselves out - sometimes a few hours later, other times a day or more later. If we reboot the server, we'll often get 2 sites happy and 1 broken. It's always random with site isn't working. After enough reboots, we'll finally get all 3 working - at least for a while.


We're running the 14.2 Jessie version. We've done kernel and software updates via SSH, upgraded WordPress to the latest version for all sites, updated all plugins, etc - nothing seems to fix it.


Webmin never seems to have problems. It's just the 3 public WordPress sites that are having issues randomly. We're not quite sure where to start diagnosing the issue. Logs, of course, but which ones and what do we want to look for? Usually LAMP is a very solid stack, but in this case it's really causing problems.


Current versions are:

Debian 8

WebMin 1.831

Apache 2.4.10

MySQL 5.7.25


Current stats are:

Real Memory: 3.87GB total, 989.65MB used

Virtual Memory: 512MB total, 1.07MB used

Local Disk Space: 17.01GB total, 9.50GB used


Any guidance would be very welcome. This has been going on for some time now.





Jeremy Davis's picture

I suspect that the best place to start would be the Apache logs. Depending on how you have your sites set up, they may be logging to individual files (one per "site"), or into a combined log (default), or a combo of both. Regardless, you should find them all in /var/log/apache2.

At the very least, that should at least give you some hints on what might be going on. I would also suggest that you check on system resources (e.g. RAM, CPU and free disk space). Judging from your post, those actually all look ok, but it's well worth watching it and comparing to when the issues actually occur. Issues with any of those being exhausted will cause weird intermittent issues, but often after what ever was causing the issue crashes, the resource usage will go back to usual. The fact that it's using any swap at all suggests that it has been swapping at some point (and thus likely running out, or at least running low on physical RAM).

Having said all that, a 5xx error (e.g. a 500 error) is usually related to the application, rather than the webserver itself (so something going wrong with WordPress itself - which may or may not be linked to lack of resources).

So to really track down the cause of the issue, you may need to dig a little deeper and enable PHP debugging/logging so that you can get a bit more clarity on what is actually going wrong.

I doubt that it's at all related, but you note use of MySQL 5.7. Seeing as that is not available from Debian (Jessie; the basis of v14.x only had MySQL 5.5), I can only assume that you have installed that from elsewhere. So even though it seems highly unlikely that would cause 500 errors, perhaps it's also worth double checking that that is working as expected (and not logging any errors).

And whilst it is unlikely to automagically resolve your immediate issues, it may be worth considering moving to v15.x. Debian Stretch (basis of v15.x) includes PHP7.0 and lots of users have reported their sites working much better/quicker with the newer version of PHP.

Please feel free to share any logs and/or info if you want further input.

Add new comment