System maintenance tasks are typically run every night to clear unused data, update database statistics, perform nightly data refreshes, and keep the server running smoothly and quickly. This topic describes how an administrator can manage maintenance tasks and the nightly schedule. System maintenance tasks will be run as the database user configured for the labkeyDataSource in the labkey.xml file. Confirm that this user has sufficient permissions for your database.

Configure Maintenance Tasks

To configure system maintenance:

  • Select (Admin) > Site > Admin Console.
  • Under Configuration, click System Maintenance.

We recommend leaving all system maintenance tasks enabled, but some of the tasks can be disabled if absolutely necessary. By default, all enabled tasks run on a daily schedule at the time of day you select (see below for notes about Daylight Savings Time). You can also run system maintenance tasks manually, if needed; use the Run all tasks link or click on an individual link to run just that task.

Note that some tasks pictured above may not be available on your server, depending on the version and features enabled.

Disable a Task

To disable a maintenance task, uncheck the box and click Save. Some tasks, such as purging of expired API keys, cannot be disabled and are shown grayed out.

View Pipeline Log

System maintenance runs as a pipeline job and logs progress, information, warnings, and errors to the pipeline log. To view previously run system maintenance pipeline jobs:

  • Select (Admin) > Site > Admin Console.
  • Under Management, click Pipeline.

System Maintenance Schedule and Daylight Savings Time

Note: Specifics of the transition hour and the amount of time the clock moves forward or back varies by locale; see:

System maintenance triggering is potentially subject to some oddities twice a year, when Daylight Savings Time transitions occur. As an example, in the United States, within time zones/locations that observe Daylight Savings Time, the following problems may occur if system maintenance is scheduled between the hours of 1:00AM and 3:00AM:

  • 1:15AM may occur twice - duplicate firings are possible
  • 2:15AM may never occur - missed firings are possible
Missing or re-running system maintenance twice a year will generally not cause any problems, but if this is a concern then schedule system maintenance outside the DST transition times for your locale.

This section is paraphrased from the Quartz Scheduler documentation; see "Daylight Savings Time" section of this page:


When using SQL Server, if the user running the maintenance tasks does not have sufficient permissions, an exception will be raised similar to this:

java.sql.SQLException: User does not have permission to perform this action.

The full text of the error will include "EXEC sp_updatestats;" as well.

To resolve this, confirm the database account that LabKey Server is using to connect to SQL Server is a sysadmin or the dbo user. Check the "labkey.xml" or "ROOT.xml" file located under the <CATALINA_HOME>/conf/Catalina/localhost directory to confirm.

As a workaround, you can set up an outside process or external tools to regularly perform the necessary database maintenance, then disable having the server perform these tasks using the System Maintenance option in the admin console.

Related Topics


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all