Maintenance
The Maintenance page groups the housekeeping actions that are run by hand: upgrading the stored User Interfaces, compacting the database and restarting the server.
Where to Find It
Navigate to: Studio → Admin → Maintenance, or browse directly to http://[serverIP]:5550/admin/maintenance.
Running a maintenance task
Tick the tasks you want to run, then click Execute at the bottom of the page. Execute stays disabled until at least one task is ticked, and you can tick more than one - they are then run in the order listed below.
The available tasks are:
| Task | What it does |
|---|---|
| Upgrade User Interfaces | Recompiles and saves the script of every User Interface in the system. Web App UIs are skipped. |
| Compact Database | Removes orphaned file chunks from the storage bucket, then compacts the database collections and their indexes to reclaim disk space. From 3.7 it first deletes orphaned records, see below. |
| Restart Server | Restarts the Erizos Studio server once the other selected tasks have finished. |
Studio confirms before it starts:
- Upgrade User Interfaces asks All User Interfaces will be upgraded / Are you sure you want to continue?, then reports progress as
Upgrading <mode> ui <name> (n/total)next to the buttons. If some interfaces fail to compile, you get a warning naming how many of the total were upgraded. - Compact Database asks Are you sure you would like to compact the database? This operation can take a while.
- Restart Server asks Are you sure you want to restart?.
- If you tick both Compact Database and Restart Server, the two prompts are replaced by a single one that lists them.
When the run finishes, Studio reports Maintenance completed successfully and clears the tick boxes.
Warning
Compacting the database can take a long time on a large installation. Run it outside show hours, and take a backup first.
Every run that reaches the server is recorded in the log: the request is logged as the action Maintenance: Execute, bracketed by Maintenance Started and Maintenance Finished entries under the System category. Use those entries to confirm what was run and when. Upgrading User Interfaces is done by the client and is not written to that log; the interfaces it rewrites appear in the log as ordinary updates.
What Compact Database clears out
From version 3.7, Compact Database is not only a disk-space operation. Before it compacts anything it deletes records that have been left behind by a show that no longer exists: every page, playlist and template whose show is missing is removed. There is no separate task for this and no confirmation of its own - it is part of Compact Database, and it runs before the file chunks are cleared and the collections compacted.
Deleting a show already removes its own pages, playlists and templates, so what this clears out is what a failed or interrupted deletion left behind. The deletion is permanent and cannot be undone from the interface, which is the other reason to take a backup before running the task.
Scheduled maintenance
Separately from this page, Studio runs a scheduled maintenance task. It is configured under Settings → Global Settings → General, in the Maintenance card:
- Maintenance - the switch in the card title. It is on by default.
- Schedule - a Cron expression,
0 4 * * *(every day at 04:00) by default. A plain-English description of the expression is shown underneath it.
The switch and the schedule are read when the server starts. A change takes effect after the next server restart.
Info
The schedule uses the Cron string format. For more information: cron string
The scheduled task performs two jobs, and the same two jobs are also run once when the server starts:
- Old dated playlists are deleted. For every show that keeps playlists by date and has an auto-delete period set, playlists whose name contains a date older than that period are removed.
- Expired MOS pages are purged. MOS pages are first re-matched to the MOS playlists that use them; any MOS page that then belongs to no playlist, is not marked as a favourite, and has not been used or updated within the number of days set in MOS Pages Purge under Settings → MOS is deleted.
Note
The scheduled task does not compact the database and does not restart the server. Both are manual actions on this page.