After App Pool reset, BE sends tons of queries to the DB, hanging the MySQL server

May 23, 2013 at 1:21 AM
Hello, I have a BE blog that runs on IIS 7.5 with MySQL. The database have around 20MB and 32000 rows of data. I am moving my site to a VPS from a shared hosting at Godaddy.

While on the shared hosting I detected that when the app pool restarted, my website become unresponsive aroung 5 to 10 minutes. Now on the VPS I can tell what is going on with behind scenes.

Testing the site on the new server, I detected the problem. Every time the IIS worker process restart, the CPU runs at 100% for several minutes (at minute 5, I restarted the MySQL process to avoid the overload of the server).
I checked that it was the MySQL server process that is consuming the CPU, and checked that the DB server was receiving a lot of queries from the worker process. Also the worker process associated with BE got hanged in the process.

I don't know what is happening, behind scenes, but seems like BE is scanning all the database records or something before publish the website, but in the process is hanging the MySQL server.

But with another more small blog, I don't have this problem. Please I need some help, I don't know if this is a BE issue related to working with a big database or another issue.

Thank you in advance.
May 23, 2013 at 11:25 AM
Find out that the issue is related to the MySQL server and the innodb_buffer_pool_size
Tunning the datase fix in some measure the issue. Now the web restarted in 1.5 minutes
May 23, 2013 at 2:54 PM
Out of curiosity, how many posts do you have on this blog? And thanks for posting this workaround.
May 23, 2013 at 8:08 PM
Hi rtur, my blog have 2611 post.