Skip to main content
Skip table of contents

Job Queues

Job queues are managed via queue handlers. Every queue handler manages its job queue, and there are three preinstalled handlers:

  • system: default handler for system jobs (clean up, performance, and backup jobs)
  • service
  • default: default handler for user jobs (materializations, replications, and SQL jobs)

You can create additional handlers using the SYSADMIN.createQueueHandler procedure and edit existing ones using the SYSADMIN.editQueueHandler procedure. If you need to drop a queue handler, this can be achieved using the SYSADMIN.dropQueueHandler procedure (please note that the three preinstalled handlers cannot be dropped). Queue handlers' statistics are available in the SYSADMIN.JobQueueStats table. Thread pool status for each queue handler is available in the SYSADMIN.JobQueueHandlersStats table.

A queue handler is a schedule parameter. The CreateSchedule and UpdateSchedule procedures have an optional queueHandler parameter to specify a queue handler. If queueHandler is not set, the default handler will be used (system for system jobs, default for other jobs).

A queue handler has a special threadCount parameter defining the number of jobs it can run in parallel. Other jobs with the same queue handler are placed in a queue and start running when another job running with this handler finishes. For preinstalled queue handlers, threadCount has the following values:

Queue handlerthreadCount value
system2
service2
default

15

While a job is in a queue, the following actions are supported for jobs and schedules:

To view the full table, click the expand button in its top right corner

ActionDescriptionStatusFailure reason
Stop jobThe job will not run

INTERRUPTED

'The job was stopped.'
Disable jobThe job remains QUEUED until it tries startingNOT_STARTED If the job is not enabled until that time'The schedule with id=<> did not run because its job (id=<>) is disabled.'
Delete job The job will not runINTERRUPTED'The job was deleted.'
Disable scheduleDisabling the schedule after it has already placed the job in a queue does not affect the job. The job remains in the queue and runs as if nothing happens. Subsequent job run that was to be triggered by this disabled schedule will not start--
Delete scheduleDeleting a schedule after it has already placed a job in a queue does not affect the job. The job remains in the queue and runs as if nothing happened--

All jobs in a specific queue can be viewed in the SYSADMIN.JobQueue table, and to clean a queue, you can use the SYSADMIN.cleanupJobQueue procedure. Total queue size is managed by the MAX_JOB_QUEUE_SIZE option (default: 10000).

The number of running user jobs cannot be more than <max active plans value> - <system jobs thread count> - <service jobs thread count> - 1. A job is placed in the queue if this limit is reached with the following reason: "Your system is misconfigured. Please configure the job queue so that the max-active-plans value is greater than or equal to the sum of all handler threads + 1".


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.