Manual talk:$wgJobRunRate

Latest comment: 11 years ago by 88.130.81.165 in topic Valid Input Range

Job Queue Length

edit

Just thought would put a note here for future reference, may be to be added to the main article?

Noticed that with out wiki the job queue counter got stuck at 1 and would not reduce to 0. There is a table in the database, called job or prefix_job that has a list of the jobs to be performed. Checked that and it was empty. User:Simetrical said the following about it in #mediawiki

the counter is deliberately inaccurate in recent versions. For speed, on large InnoDB tables. 
SELECT COUNT(*) FROM table; is slow on InnoDB, so it switched to a heuristic that's usually wrong.

--Dr DBW 24 October 2007

I don't know if/in how far the code has changed, but in MediaWiki 1.22 I get correct numbers, especially when the DB table is empty I actually really get "0". --88.130.81.165 03:22, 20 December 2013 (UTC)Reply

Valid Input Range

edit

The documentation for this variable claims only values above 0 are allowed, but that's not true. The actual program logic in Wiki.php readily accepts such input, and behaves exactly as expected with $wgJobRunRate <= 0 (doJobs() returns immediately). Not only is this valid, but also desirable on small wikis. I'm going to use this setting as soon as I've set up a cron job to do handle the job queue, since page loads with a non-empty queue are painfully slow, near-instantaneous otherwise.

--HonoredMule 11:25, 25 April 2011 (UTC)Reply

You are right; 0 makes sense and is allowed as well. That now also is part of the article. --88.130.81.165 03:22, 20 December 2013 (UTC)Reply
Return to "$wgJobRunRate" page.