I have a VPS running a Ubuntu 16.04.1 LAMP stack and I recently started getting a problem where MySQL (MariaDB) will stop working (the static content from my sites is still served, but the database is down). I suspect it might be lack of memory because it is only a 512MB droplet. But I don't know how I could confirm that is the issue and I don't want to upgrade my VPS unless I know that is the problem. Also my client reports that most of the time when this happens it is when they are uploading a batch of pictures to their photo gallery. I looked in the Apache logs and didn't see anything that stood out to me.
Asked
Active
Viewed 33 times
1 Answers
3
The way to solve this problem, like many others is to be well informed.
- Look in all of your logs for relevant information.
- Install monitoring and gather data. -- Correlate the data gathered with observed problems.
- Apply Scientific Method
It really is that straightforward.
user9517
- 114,104
- 20
- 206
- 289
-
Can you suggest what type of monitoring would be useful for diagnosing this? It seems like it is already pinpointed to MySQL so I don't know how useful a general monitoring tool would be. Also my logs in `/var/log/mysql/error.log` are empty. – Erik Berkun-Drevnig Aug 05 '16 at 16:03
-
1Check that that is where mysql is configured to write it's error logs. Increase the log verbosity etc. – user9517 Aug 05 '16 at 16:07