1

I'm running wiki (MediaWiki engine) on shared hosting with cPanel. First four or five days CPU load was rather low but then it rapidly increased in two-three times. Number of visitors was the same as other days. I've tried to turn off all extensions — it had little effect. Then I've tried to change PHP settings (such as memory_limit and max_execution_time) through .htaccess: no effect. Enabling/disabling any cache doesn't help.

After my request site was moved to another server of the same hoster. First two-three hours CPU load was low again, but then increased. Number of visitors all this time was as usual (30-40 according to Google Analytics).

Access logs doesn't show any signs of DoS or brute-force.

What it can be and how to fix it?

  • I'm thinking that it could be some sort of refresher script running...did you disable caching on MediaWiki? Also, have you checked access logs on SSH (assuming you're on some form of UNIX)? – Sameer Puri Mar 10 '15 at 03:24
  • Now all the caches on MediaWiki are disabled. I've looked through access logs: no suspicious activity. – DanielOlivo Mar 10 '15 at 04:00
  • Who are you hosting with, if you don't mind me asking, and if it's a VPS, how many vCPUs? – Sameer Puri Mar 10 '15 at 04:09
  • "Reg.ru", virtual shared hosting, non-VPS. – DanielOlivo Mar 10 '15 at 04:12
  • MediaWiki is a heavy weight. You're hosting it on something that isn't designed to support any sort of load. You're bound to have problems. Without any sort of profiling to figure out where the issue is, we certainly won't be able to assist. Can you install New Relic or anything to dig in and figure out what's happening, even if just for a couple days? – Brad Mar 10 '15 at 04:15
  • I looked at your provider, and I think you would be better off with something that gives you a dedicated share of resources... i.e. an OVH VPS (https://www.ovh.com/us/vps/vps-classic.xml) or if you want I could try to host it for you, depending on the content. – Sameer Puri Mar 10 '15 at 04:17
  • I can't install New Relic now (no root access), but I'll migrate to VPS tomorrow or day after and see if there is still problem. I thought about it and now comments confirmed my suspicions about migration necessity. Site has near 1000 users per day. – DanielOlivo Mar 10 '15 at 04:25

1 Answers1

1

If you want to get detailed information on how CPU time is distributed, you can install XHProf (it's integrated into MediaWiki starting with 1.25, although that probably doesn't help you). But chances are the job queue is filling up, see the link for various ways of checking that and for performance tips. (The job queue mostly involves follow-up updates after page edits; caching won't have a bug effect on it.)

Tgr
  • 27,442
  • 12
  • 81
  • 118