0

I am running MySQL 5 on a production Ubuntu 8.04 server. Two separate php based sites are served, both of which involve intensive mysql queries.

What I noticed is that when I request a page on the first site, which causes a 100% cpu load by mysql for 1 min., the login page of the second web site cannot even be served. It seems that mysql fully occupies the cpu, so that even non demanding tasks cannot be completed in the meantime. Is there a way to work around this situation? Where does the real reason of the problem lie?

Thank you.

  • 1
    A table schema and the query(ies) being run on page load will be necessary to identify the issue. – sreimer Jul 28 '11 at 21:34

1 Answers1

0

It is hard to give a good solution w/out digging more into the workloads of both apps, but basically you have a few options. Either fix the code so it doesn't cause the DB to lock for a minute, get some caching implemented (memcache/squid), upgrade the mysql box, or get a second box. You should do some basic mysql checks like make sure you have query cache enabled and are utilizing as much ram as possible.

opsguy
  • 801
  • 1
  • 5
  • 12