Forum Moderators: coopster

Message Too Old, No Replies

PHP script hogging all the CPU

         

StoutFiles

3:31 pm on May 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have a windows machine where one PHP script (database extraction) hogs all the CPU so that no other pages can load while it's running.

To fix this would I edit the php.ini file or is it something to change in Apache?

Readie

5:48 pm on May 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Really it's something that you'd fix in the script and the database - try and make the code more efficient and try optimising the indexes in the database.

With regards to index optimisation, it's worth reading [dev.mysql.com...] and the comments at the bottom of the page.