Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Manual/Job queue
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== History == <!--T:20--> === Asynchronous === <!--T:21--> <!--T:22--> The configuration variable <tvar name=RunJobsAsync></tvar> has been added to force the execution of jobs synchronously, in scenarios where making an internal HTTP request for job execution is not wanted. </translate> <translate><!--T:23--> When running jobs asynchronously, it will open an internal HTTP connection for handling the execution of jobs, and will return the contents of the page immediately to the client without waiting for the job to complete.</translate> <translate><!--T:24--> Otherwise, the job will be executed in the same process and the client will have to wait until the job is completed.</translate> <translate><!--T:25--> When the job does not run asynchronously, if a fatal error occurs during job execution, it will propagate to the client, aborting the load of the page.</translate> <translate><!--T:26--> Note that even if $wgRunJobsAsync is set to true, if PHP can't open a socket to make the internal HTTP request, it will fall back to the synchronous job execution.</translate> <translate><!--T:75--> However, there are a variety of situations where this internal request may fail, and jobs won't be run, without falling back to the synchronous job execution.</translate> <translate><!--T:76--> Starting with MediaWiki 1.28.1 and 1.27.2, $wgRunJobsAsync now defaults to false.</translate> <translate> === Deferred updates === <!--T:85--> </translate> <translate><!--T:82--> The ''deferred updates'' mechanism allows the execution of code to be scheduled for the end of the request, after all content has been sent to the browser.</translate> <translate><!--T:135--> This is similar to queuing a job, except that it runs immediately instead of upto several minutes/hours in the future.</translate> <translate><!--T:81--> <tvar name=1><code>DeferredUpdates</code></tvar> was introduced in MediaWiki 1.23 and received major changes during MediaWiki 1.27 and 1.28.</translate> <translate><!--T:83--> The goal of this mechanism is speed up the web responses by doing less work, as well as to prioritise some work that would previously be a job to run as soon as possible after the end of the response.</translate> <translate><!--T:136--> A deferrable update can implement <tvar name=1><code>EnqueueableDataUpdate</code></tvar> in order to be queueable as a Job as well.</translate> <translate><!--T:137--> This is used by <tvar name=1><code>RefreshSecondaryDataUpdate</code></tvar> in core, for example, which means if the update fails for any reason, MediaWiki will fallback to queuing as a job and try again later as to fulfil the contract in question.</translate> <translate> === Changes in MediaWiki 1.22 === <!--T:30--> </translate> <translate><!--T:31--> In <tvar name=mw></tvar>, the job queue execution on each page request was changed (<tvar name=gerrit></tvar>) so, instead of executing the job inside the same PHP process that's rendering the page, a new PHP CLI command is spawned to execute <tvar name=runJobs></tvar> in the background.</translate> <translate><!--T:32--> It will only work if <tvar name=PhpCli></tvar> is set to an actual path or safe mode is off, otherwise, the old method will be used.</translate> <translate> <!--T:33--> This new execution method could cause some problems: <!--T:34--> * If <tvar name=PhpCli></tvar> is set to an incompatible version of PHP (e.g.: an outdated version) jobs may fail to run (fixed in 1.23).</translate> <translate> <!--T:35--> * PHP <tvar name=1><code>open_basedir</code></tvar> restrictions are in effect, and <tvar name=PhpCli></tvar> is disallowed (<tvar name=task></tvar>, fixed in 1.23).</translate> <translate> <!--T:36--> * Performance: even if the job queue is empty, the new PHP process is started anyway (<tvar name=task></tvar>, fixed in 1.23).</translate> <translate> <!--T:37--> * Sometimes the spawning PHP process cause the server or only the CLI process to hang due to <tvar name=1>stdout</tvar> and <tvar name=2>stderr</tvar> descriptors not properly redirected (<tvar name=task></tvar>, fixed in 1.22)</translate> <translate> <!--T:38--> * It does not work for shared code (wiki farms), because it doesn't pass additional required parameters to <tvar name=1>runJobs.php</tvar> to identify the wiki that's running the job (<tvar name=task></tvar>, fixed in 1.23)</translate> <translate> <!--T:39--> * Normal shell limits like <tvar name=1>, , </tvar> are enforced on the <tvar name=2>runJobs.php</tvar> process that's being executed in the background. </translate> <translate><!--T:40--> There's no way to revert to the old on-request job queue handling, besides setting <tvar name=PhpCli></tvar> to <tvar name=1><code>false</code></tvar>, for example, which may cause other problems (<tvar name=task></tvar>).</translate> <translate><!--T:41--> It can be disabled completely by setting <tvar name=code> 0;}}</tvar>, but jobs will no longer run on page requests, and you must explicitly run <tvar name=1>runJobs.php</tvar> to periodically run pending jobs.</translate> <translate> === Changes in MediaWiki 1.23 === <!--T:42--> <!--T:43--> In MediaWiki 1.23, the 1.22 execution method is abandoned, and jobs are triggered by MediaWiki making an HTTP connection to itself. <!--T:44--> It was first designed as an [[<tvar name=man>Special:MyLanguage/Manual:API</tvar>|API]] entry point (<tvar name=gerrit1></tvar>) but later changed to be the unlisted special page <tvar name=1>[[Special:RunJobs]]</tvar> (<tvar name=gerrit2></tvar>). <!--T:45--> While it solves various bugs introduced in 1.22, it still requires loading a lot of PHP classes in memory on a new process to execute a job, and also makes a new HTTP request that the server must handle. === Changes in MediaWiki 1.27 === <!--T:86--> <!--T:87--> In MediaWiki 1.25 and MediaWiki 1.26, use of <tvar name=1></tvar> would sometimes cause jobs not to get run if the wiki has custom <tvar name=2></tvar> configuration. This was fixed in MediaWiki 1.27. </translate> <translate> === Changes in MediaWiki 1.28 === <!--T:88--> <!--T:89--> Between MediaWiki 1.23 and MediaWiki 1.27, use of <tvar name=1></tvar> would cause jobs not to get run on if MediaWiki requests are for a server name or protocol that does not match the currently configured server name one (e.g. when supporting both HTTP and HTTPS, or when MediaWiki is behind a reverse proxy that redirects to HTTPS). This was fixed in MediaWiki 1.28. </translate> <translate> === Changes in MediaWiki 1.29 === <!--T:90--> <!--T:77--> In MediaWiki 1.27.0 to 1.27.3 and 1.28.0 to 1.28.2, when <tvar name=1></tvar> is set to a value greater than 0, an error like the one below may appear in error logs, or on the page: </translate> <pre> PHP Notice: JobQueueGroup::__destruct: 1 buffered job(s) never inserted </pre> <translate><!--T:78--> As a result of this error, certain updates may fail in some cases, like category members not being updated on category pages, or recent changes displaying edits of deleted pages - even if you manually run <tvar name=runJobs></tvar> to clear the job queue.</translate> <translate><!--T:79--> It has been reported as a bug (<tvar name=bug></tvar>) and was solved in 1.27.4 and 1.28.3.</translate> === Changes in MediaWiki 1.17 === <translate><!--T:67--> Up to MediaWiki 1.16, the job queue value was shown on <tvar name=1>[[Special:Statistics]]</tvar>.</translate> <translate><!--T:68--> Since 1.17 (<tvar name=rev>[[rev:75272]]</tvar>) it's been removed, and can be seen now with <tvar name=api></tvar>:</translate> === MediaWiki 1.6 === <translate> <!--T:1--> In 2009 ([[<tvar name=1>Special:MyLanguage/Release notes/1.6</tvar>|MediaWiki 1.6]]) the '''job queue''' was introduced to perform long-running tasks asynchronously.
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)