Last modified: 2014-04-11 16:21:06 UTC
Probably since https://gerrit.wikimedia.org/r/#/c/59797/ job handling starts an external php process by default. This happens even if the job queue is empty. Is this intentional? I somehow doubt starting a php interpreter just to find out it's empty won't improve performance... I'm quite sure checking the database if there are jobs to run won't be too "expensive", and can avoid lots of more expensive PHP interpreter starts ;-)
I can confirm this bug. Setting $wgPhpCli to a bash script that writes a line to a log file, on a development wiki with no edits and an empty job table, loading any page gives a new line on the log.
Change 113038 merged by jenkins-bot: Moved job running via $wgJobRunRate to a special API https://gerrit.wikimedia.org/r/113038
(In reply to Gerrit Notification Bot from comment #2) > Change 113038 merged by jenkins-bot: > Moved job running via $wgJobRunRate to a special API > > https://gerrit.wikimedia.org/r/113038 This doesn't fix anything. It doesn't open a new shell, but makes a new api call even if there's no job in the queue. Whith the default value of $wgJobRunRate = 1, that means every page request to MediaWiki is translated to 2 separate HTTP requests that the server must handle, with all the memory consumption that they involve.
Change 124629 had a related patch set uploaded by Aaron Schulz: Backoff doing job run requests when the queue is empty https://gerrit.wikimedia.org/r/124629
Change 124629 had a related patch set uploaded by Ori.livneh: Avoid making a derivative request to Special:RunJobs when the job queue is empty https://gerrit.wikimedia.org/r/124629
Change 124629 merged by jenkins-bot: Avoid making a derivative request to Special:RunJobs when the job queue is empty https://gerrit.wikimedia.org/r/124629
As of change Icb95c35f4, MediaWiki is smart enough to check that the queue is nonempty before spawning another request. And for those cases where resource constraints make the cost of an additional request prohibitive, I892a36082 added $wgRunJobsAsync, which can be used to disable parallelism altogether.