Skip to content

Jobs and queues#

Everything that can take time in Empowerment Center (calculating a cube, a chart or a map, refreshing a list, loading external data, publishing, a query through the API, a delivery) is calculated as a background job, never while the browser waits for the response. This page explains how jobs live, how they are spread across queues and what you can do with them.

Before you start#

  • To see and terminate the jobs of all users you need System administration: they are in the console's Jobs tab (see The operations console).
  • Each user sees and cancels their own in the Activity panel of the application's top bar (see the User manual).

The life cycle of a job#

Life cycle of a job States of a job: it is submitted and stays queued until there is room in its queue, moves to running and ends finished or failed; it can be canceled while queued, without ever running, or while running, canceling the statement in the client database. Submitted There is room in its queue Ends well Error (also a serious server error) End or Cancel: it never runs End or Cancel: the statement is canceled in the client database Queued Running Finished Failed Canceled waits for room in its class queue The three final states announce the end of the job once and stay in the history (90 days) and in the audit. The result is kept 30 minutes on the instance that calculated it.
Life cycle of a job States of a job: it is submitted and stays queued until there is room in its queue, moves to running and ends finished or failed; it can be canceled while queued, without ever running, or while running, canceling the statement in the client database. Submitted There is room in its queue Ends well Error (also a serious server error) End or Cancel: it never runs End or Cancel: the statement is canceled in the client database Queued Running Finished Failed Canceled waits for room in its class queue The three final states announce the end of the job once and stay in the history (90 days) and in the audit. The result is kept 30 minutes on the instance that calculated it.
Life cycle of a job View full size View full size
Status In the console What it means
QUEUED Queued It waits in its class's queue for a free slot.
RUNNING Running It is being calculated.
DONE Finished It finished well; its result is available to whoever launched it.
FAILED Failed It finished with an error, which can be seen in the console and in the history.
CANCELED Canceled Whoever launched it, an administrator or the server itself canceled it (for example, because the time of a scheduled recalculation ran out).

The rules worth knowing:

  • Every job ends in one of the three final statuses, including the one canceled in the queue without ever running and the one hit by a serious server error (it is left Failed).
  • The result can only be collected by whoever launched the job, because it is calculated with their columns and universes. Whoever has System administration sees the job and can cancel it, but does not collect its result.
  • A job runs with the identity of whoever sent it, and with the channel through which they sent it (their session, a scheduled task, a delivery, the API…), which is recorded in the audit.
  • The error of an unexpected failure shows no internal details: it says the error was internal and the detail is in the server log. Look in the log for the time of the failure (see Metrics, health and logs).
  • What has finished stays in memory, with its result, for 30 minutes (ecenter.jobs.result-ttl). After that it only remains in the history.
  • The job history is kept for 90 days (ecenter.operations.maintenance.job-history) and it is where the Activity table of the Jobs tab, the Finished jobs gadget and the Many failed jobs alert come from. Each finished job is also recorded in the audit (Jobs category).

Classes and queues#

Each job belongs to a class, and each class has its own queue with a maximum number of jobs calculated at once. What does not fit waits in its class's queue without taking a slot from the others.

Class In the console At once, by default
CUBE Cubes 4
REPORT Reports 4
CHART Charts 4
MAP Maps 4
LIST Lists 4
FORM Forms 4
EXTERNAL_DATA External data 4
PUBLICATION Publications 4
LEGACY_IMPORT Empowerment Center 7 imports 4
API API queries 2
DELIVERY Deliveries and data alerts 2
FILE_EXPORT File export (a file of a workbook's export, see File export) 2
OTHER Others (checking the alerts, delivering events again, reading the catalog…) 4

The limits are changed per class with ecenter.jobs.max-concurrent.<CLASS> and that of the others with ecenter.jobs.default-concurrency (4):

ecenter:
  jobs:
    default-concurrency: 4
    max-concurrent:
      CUBE: 6
      API: 2
      DELIVERY: 2

Within a queue, what the portal requests has priority over the analysis application and the recalculations: in the console it carries the Portal badge.

Important

Each job that queries a client database needs a session from that connection's pool, which has 5 by default (ecenter.datasource.pool.max-size) and is shared by all classes. If you raise the queue limits without raising the pool, jobs will wait for a free session and fail after 15 seconds (ecenter.datasource.pool.connection-timeout) even if there are free threads. See Troubleshooting.

Maximum times#

What Limit Property
Each statement in the client database 5 minutes ecenter.querying.timeout
Each attempt to recalculate a workbook in a scheduled task 2 hours ecenter.scheduling.recalc-timeout
The file export of a workbook, apart from the recalculation 2 hours ecenter.file-exports.timeout
The wait of an ad hoc query in the request, before carrying on as a job 30 s ecenter.querying.ad-hoc-wait

Cancel a job#

A job is canceled from the console's Jobs tab (Terminate), from the Activity panel of whoever launched it (Cancel) or when a scheduled run is stopped.

  • If it is queued, it never runs.
  • If it is running, ECenter cancels in the client database the statement it has in progress, discards the session it was using and does not let another one start. Whoever cancels does not wait for the database: the cut is made separately.
  • It is not a failure: the job is left Canceled, it does not count for the failed jobs alert and a canceled delivery or data alert is not treated as failed.

In Oracle without out-of-band breaks, a statement that is sleeping or waiting for a lock does not attend the cancellation at once; if it has not come out within 10 seconds, ECenter interrupts its job anyway.

There is no forced termination: a thread is not killed halfway, which would leave memory, locks and connections unreleased.

Cap of queued jobs per user#

So that a single user does not leave everyone else waiting, each one can have at most 100 jobs of the same class waiting in their queue (ecenter.jobs.max-queued-per-user, or ECENTER_JOBS_MAXQUEUEDPERUSER). The next one is rejected:

  • In the application, with 429 TOO_MANY_JOBS, the Retry-After: 10 header and the message “You already have 100 jobs of this type waiting in the queue: wait for them to start or cancel some from Activity”.
  • In the query API and the MCP server, with 429 TOO_MANY_RUNNING.

What the scheduler, distribution and file export launch on behalf of a user (scheduled tasks, deliveries, data alerts and workbook files) neither counts nor is rejected. The cap is per instance. If a workbook with many documents reaches it when processed whole, raise it.

Several instances#

Jobs, their queues and their results live in the memory of the instance that calculates them. Therefore:

  • The console's Jobs tab shows those of the instance serving you (the one in the header). Sessions, open workbooks and alerts do belong to all of them.
  • The proxy has to send the requests of the same user to the same instance (affinity by the session cookie), or it will not find their job. See Installation.
  • The limits of each queue and the cap per user are per instance.
  • The gadgets of the Activity tab do count the jobs of all of them, because they come from the common history.

See also#