Thread:Project:Support desk/Upgrade to 1.22.0 from 1.21.2 causes indefinite loading of pages. Possible problem with runJobs.php script and/or cookies?/reply (3)

No, runJobs.php is not started automatically during normal page requests. During normal page requests MediaWiki initializes a Job object and on average it runs the number of jobs defined by $wgJobRunRate, but this does not happen through runJobs.php. So by default MediaWiki renders the page, which was hit by the visitor and additionally one job, which is in the queue, is executed (most likely this will render a second page).

Let us assume with $wgJobRunRate = 1; you always had some jobs in the queue. So when you set $wgJobRunRate to something close to zero, then you take away a bit less than half of the rendering work. However, depending on the number of hits to your wiki and depending on the complexity of templates and the number of pages, it might now be that the job queue starts filling up without being emptied quickly enough. That will e.g. lead to outdated information on "What links here" pages and stuff like that. You can check to see, if you have that problem by looking at how many rows you have in the database table jobs. A high and constantly growing number is not good.

runJobs.php by default is only executed when you execute it manually on the shell. Then(!) it runs a number of 10.000 jobs - and because they have been run(!) it clears them, not all, only those which were run, from the queue. The 10.000 are only the default; you can adjust this number with the parameter --maxjobs.