MySQL Crash for High Traffic

5 posts / 0 new
Last post
#1 Wed, 10/07/2015 - 18:45
LupettoOne

MySQL Crash for High Traffic

Hi, 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:

Debian 8 Virtualmin + Webmin 2 Core | 3.1 Ghz x2 4GB Ram 50GB HDD

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.

Wed, 10/07/2015 - 19:35
mvander25

First question that comes to mind is: What size is your swap file?

Wed, 10/07/2015 - 20:39
Diabolico
Diabolico's picture

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 often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Thu, 10/08/2015 - 02:04
andreychek

Howdy,

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"?

-Eric

Thu, 10/08/2015 - 04:06
LupettoOne

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.

Attached screenshots.

Thank you all.

Topic locked