[Mediawiki-l] Mediawiki using excessive CPU on shared server

Francesco Petracca ftpetracca at gmail.com
Wed Aug 19 22:07:11 UTC 2009


I have a shared server account with Lunarpages that I have been using
for the past three years to host a fan wiki for a tv show. Everything
was running smoothly until about a month or so ago. It was a couple of
weeks after I had updated to Mediawiki 1.15 (I had been using 1.13
previously). I got a message from Lunarpages that index.php was using
too much of the server's processor power (spiking from 1.3% - 2.5%
cpu, the allowable limit on the shared server is 1% ).

They disabled the script until I could find a solution. There was a
fatal error that I noticed in my php error log:

[20-Jul-2009 16:57:40] PHP Fatal error: require() [<a
href='function.require'>function.require</a>]: Failed opening required
'{EDIT}//w/includes/parser/LinkHolderArray.php'
(include_path='/{EDIT}/w:/{EDIT}/w/includes:/{EDIT}/w/languages:.:/usr/lib/php:/usr/local/lib/php')
in /{EDIT}//w/includes/AutoLoader.php on line 582

Shortly before the incident, 1.15.1 had come out and it did have some
bugfixes so I upgraded, figuring the error may have been the cause of
the spike. After the upgrade, I noticed no more fatal errors. The
issue seemed to go away for a bit, until I got a notice a couple of
days later of another spike:

Average %CPU usage - 1.35
Average %Memory usage - 0.82
Average %MySQL usage - 0.1

{EDIT} 1.35 0.82 0.1
Top Process %CPU 50.0 [php-cgi]
Top Process %CPU 43.0 [php-cgi]
Top Process %CPU 34.0 /usr/local/php5/bin/php-cgi
/{EDIT}/public_html/w/index.php

Is my wiki just outgrowing the shared host? In the past 6 months my
daily averages have been ~15-31k hits amongst 500-1000 visitors. Any
ideas what I can reasonably expect Mediawiki to support while staying
under my host's 1% load (I'm not sure of their hardware....)  Are
there certain questions I should be asking the tech support people to
try to narrow down where the issue lies?

Are there any configuration settings I should know about that could
minimize the load? I've already turned off all the ajax functions.

I really can't afford a dedicated server just for a hobby site, but
I'd hate to have to bring the wiki down. It'd also be a pain to find a
new host since I just this month paid for the next year of hosting.
Thanks for all the help you can offer.

-F.t. Petracca



More information about the MediaWiki-l mailing list