Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.