I have problems with my VPS. I have a website on Wordpress platform of photographic events and every time I publish an event many users connect at the same time causing the server to crash. I monitored the server and it seems that the problem is in MySQL as all other protocols such as Apache and Postfix work.
The hardware configuration of my VPS is this:
Virtualmin + Webmin
2 Core | 3.1 Ghz x2
I also noticed that when there is high traffic VPS seems to go well and remain at around 1.6GB RAM occupied although there are 30 websites hosted on the VPS. So I do not think that the VPS can not handle the user load but I think instead that depends on which MySQL crashes.
The configurations of MySQL are Default and I think I should customize the setup but I do not know what to change.
Attached a screenshot of MySQL: https://www.virtualmin.com/files/Screenshot_0.png
Thanks to those who want to help.
First question that comes to mind is: What size is your swap file?
First you need to fine tune your MySQL, second if other 30 website are not static it could be your VPS is too small to handle everything. But good start would be to use mysqltuner and tuning-primer (google for them) and see what results you get and then you should have better idea what to do.
There isnt one setting for everything and really depends on your situation so hardly can anyone give you an answer not knowing what is going on with your server.
I’d be curious what kind of VPS you’re using. If it’s OpenVZ, could you share your /proc/user_beancounters file?
Also, what is the output of the command “dmesg | tail -30”, and “free -m”?
Thank you all for responding.
At the end of my VPS Cloud Provider it resides on OVH and seems to have no swaps as panel Webmin band Swap I do not see but only the end of RAM.
While all the other websites that are static do little traffic and few access logs. Apache Access Log on other websites make up 200/500KB per day while the website of photographic events logs me also coming to 50MB per day but only when public photos events during otherwise normal days does not cause crashes.
Thank you all.