Skip to the content
Documentation

[ContentJobSettings]

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

The group [ContentJobSettings] of settings/content.ini.

File

settings/content.ini; override it in settings/override/content.ini.append.php, in a siteaccess or in an extension.

Settings

Setting Default Description
SynchronousLimit 50 Content jobs: large subtree removes (content/removeobject, content/removenode) and subtree copies (content/copysubtree) run in batches in a background worker instead of in the web request, so they never fail from a request time limit, a memory limit or one huge transaction. Each batch is a transaction of its own, followed by a checkpoint: a job resumes where it stopped after any interruption (kill -9 included). Classes in kernel/classes/contentjob/; the command bin/php/expcontentjob.php (./console exp:expcontentjob list|show|run|resume|cancel|remove|copy). Jobs live in var/<site var dir>/jobs/content/ (a cluster needs a shared var directory for them). The user chooses per operation whether it runs now (in the request) or as a background job; this sets the choice offered first: below this number of nodes "now", from it on "job". 0 = "job" always.
NowLimit 1000 "Now" is refused above this number of nodes, with a message to run it as a job. 0 = no ceiling.
BatchSize 50 Nodes per batch (one transaction each). On SQLite (one writer at a time) the worker halves the next batch while one holds the write lock over 2 s, and grows it back to BatchSize when they are quick again.
BatchPause 0 Pause between batches in milliseconds (0 = none), to leave room for other writers.
QueuedGrace 60 A queued job whose worker has not started within this many seconds is started by the cronjob part 'contentjobs' (frequent group); a running job whose worker died is started at once.
QueuedTimeout 600 A queued job that no worker started within this many seconds (no cronjob runs, the start was lost) fails and gives back its locks if it has done nothing yet, so it never blocks a subtree; resume it to try again. A worker that cannot be started at all fails the job at once, with the reason. 0 = never expire.
MaxAttempts 5 A job whose worker is started this many times without finishing one batch is failed (with the last error) instead of being retried for ever. Resume it once the cause is fixed. It is also how often the cronjob part resumes a job on its own that failed for a temporary database error (busy, locked, a deadlock); the count starts again after every batch done.
BusyRetries 8 A batch that fails because the database is busy or locked (SQLite "database is busy" or "locked", MySQL lock wait timeout 1205 or deadlock 1213) is rolled back and run again from the last checkpoint up to this many times, after a pause that doubles each time (1, 2, 4 ... seconds). Then the job fails with a temporary error, which the cronjob part resumes on its own. 0 = fail at the first such error.
BusyBackoffMax 60 The longest pause between two of those tries, in seconds.
KeepDays 30 Finished (done or cancelled) jobs are removed by the cronjob part after this many days. 0 = never.
PhpBinary (empty) The PHP command line binary for the worker; empty = the PHP running the request (PHP_BINDIR/php).
JobTypes[<key>] remove=expContentJobRemoveSubtree; copy=expContentJobCopySubtree; move=expContentJobMoveSubtree; hide=expContentJobHideSubtree; reveal=expContentJobRevealSubtree; section=expContentJobSectionSubtree; state=expContentJobStateSubtree; addlocation=expContentJobAddLocation; removelocation=expContentJobRemoveLocation; packageinstall=expContentJobPackageInstall; auditexport=expContentJobAuditExport; ... The job types: JobTypes[<name>]=<class implementing expContentJobType>.

See also

Generated example: content.ini [ContentJobSettings]

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/content.ini.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.