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 application.properties 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/Summer Time Changes

Note: Specifics of the date, transition hour and the amount of time the clock moves forward or back varies by locale. Learn more here:

System maintenance triggering is potentially subject to some oddities twice a year when clock time is changed. In some locales, if system maintenance is scheduled near the transition hour, such as at 2:15AM:
  • 2: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 after the transition time for your locale.

Troubleshooting

If the user running the maintenance tasks does not have sufficient permissions, an exception will be raised. It might be similar to this:

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

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

To resolve this, confirm the database account that LabKey Server is using to connect is a sysadmin or the dbo user. Check the application.properties file for the username/password, and use this credential to access the database directly 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


previousnext
 
expand allcollapse all