Difference between revisions of "21 December 2010"

From Organic Design wiki
m
(The specific DPL queries that have been causing the trouble are those that include the "createdby" parameter)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{news|title=Killer query problem|img=|msg=
 
{{news|title=Killer query problem|img=|msg=
We kept getting MySQL running at 100% CPU, making the site inaccessible for many minutes at a time! Whenever this occurred, logging in to MySQL and doing a '''show processlist''' command would reveal that a heavy DPL query was running. We had found previously that some kinds of DPL queries were extremely CPU intensive, but had removed them all from the site. By checking the activity log for requests made by the same IP as that relating to the heavy query in the MySQL process list, I discovered that the problem was always being caused by link-crawler robots scanning through historical articles, so as a temporary solution I've disabled history for anonymous users.
+
We kept getting [[w:MySQL|MySQL]] running at 100% CPU, making the site inaccessible for many minutes at a time! Whenever this occurred, logging in to MySQL and doing a [http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html show processlist] command would reveal that a heavy [[MW:Extension:DynamicPageList (third-party)|DPL query]] was running. We had found previously (on [[4 January 2008]]) that some kinds of DPL queries were extremely CPU intensive, but had removed them all from the site.
 +
 
 +
By checking the activity log for requests made by the same IP as that relating to the heavy query in the MySQL process list, I discovered that the problem was always being caused by [[w:Web crawler|link-crawler]] robots scanning through historical articles, so as a temporary solution I've disabled diff and history functions for anonymous users. The specific DPL queries that have been causing the trouble are those that include the '''createdby''' parameter.
 
}}
 
}}

Latest revision as of 20:39, 30 December 2010

Warning.svg This is a blog item that needs to be converted to the new Bliki format


Killer query problem

We kept getting MySQL running at 100% CPU, making the site inaccessible for many minutes at a time! Whenever this occurred, logging in to MySQL and doing a show processlist command would reveal that a heavy DPL query was running. We had found previously (on 4 January 2008) that some kinds of DPL queries were extremely CPU intensive, but had removed them all from the site.

By checking the activity log for requests made by the same IP as that relating to the heavy query in the MySQL process list, I discovered that the problem was always being caused by link-crawler robots scanning through historical articles, so as a temporary solution I've disabled diff and history functions for anonymous users. The specific DPL queries that have been causing the trouble are those that include the createdby parameter.