Jump to content


PHP/MySQL DB Calls are eating my CPU!

  • Please log in to reply
2 replies to this topic

#1 sploofus

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 23 February 2006 - 05:41 AM

I am running PHP 4.3.9 and MySQL 4.1.10.

I have several DB calls, all with proper PHP syntax, in any given page. With only a few users on the site, my processor usage immediately spikes to 99.9%, and the average load is like 62.4, 54.1, 59.0!

This never happend to me using the same scripts with MySQL 3.23 and PHP 4.1

The server is running RHE4, 3.0 GHz P4 and 2 GB RAM. The hosting company is telling me that my DB queries are being pushed out into memory and that is causing the processor to get overloaded. Is this something new in 4.1? Any suggestion?

Help please!

#2 wisewood

  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 23 February 2006 - 11:22 AM

are you using select * from 'table' or specifying only the fields you need for each query? selecting for example...

SELECT field1, field2, field3 FROM table

this can use much less cpu & memory
wisewood: proven fact, I am both wise, and wooden.

#3 sploofus

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 06 April 2006 - 03:23 AM

You have a corrupt MySQL table. Run a myisamchk on your tables. Your processor and load average is being eaten by MySQL attempting to rectify a corrupted table.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users