SQL issue
I have an app and a website that I have running on my linode, both are currently not released and in the trial phase. Lately something strange has started happening with both of them simultaneously.
Background
I have an image and video sharing app that's going to come out.
Issue
The app works fine at one time and in a flash the link between the app and sql gets terminated. Upon restarting mysql it works fine but only for a while and crashes again. Whenever the app goes down, at the same time the website also goes down. stating 'cannot connect to database'
Linode support states that the Linode is running out of memory.
The app and the site are completely empty and with only 2-3 test users, so overloading of the services in any way is out of the question.
Could anyone please help me out here? I'm not very good at this apparently.
Pretty much a newbie here.
- Would really appreciate any help.
5 Replies
Make sure you're not out of storage, run a df -h . If you're out of storage, your MySQL will crash almost immediately.
Check your RAM while the issue happens. free -m is enough to tell.
Check your logs. No matter what the issues is, checking your logs should explain that your server served this error and will show what happened right before it happened. Your logs are stored in /var/log for Debian systems.
Good luck!
I'm having similar issues for no apparent reason.
If you're having space issues, regardless the distro you're using, maybe this can help you:
Also, to the already suggested, I recommend you tune your Mysql/MariaDB database.
see here:
And the equivalent to Mysql tuner in Apache:
Although I haven't completely solved my question, It has improved a lot for me.
Best Regards
I uninstalled MariaDB and installed MySQL, this has solved the issue. (Or it seems to have solved the issue atleast)
I want to make sure something like this doesn't pop up again (Would be really troublesome if it comes up after the app launches) any suggestions to make sure that the VPS is tuned up and optimized to its fullest capacity?
Thanks again guys!
Good luck, Tinman!