...
Note |
---|
If you are experiencing any of the above issues, check that the maintenance script is running correctly. You can do this in the Revive Adserver user interface as an administrator user by going to Configuration > Maintenance. |
Built-in automatic maintenance
By default, Revive Adserver uses the built-in automatic maintenance system, which triggers the maintenance script via banner delivery. This attempts to ensures that maintenance is always run, even if Revive Adserver has been installed without configuring that maintenance be run via a scheduled task runner. However, there are a number of disadvantages to leaving the built-in automatic maintenance as the mechanism by which the maintenance script is triggered:
- Revive Adserver will wait for five minutes beyond the "ideal" time to start running the maintenance script, to allow time for any manually scheduled maintenance to complete. As a result, user interface statistic updates, campaign activation/deactivation, banner prioritisation and emailing of reports will be slightly delayed compared with manually scheduled running of maintenance;
- As the maintenance script is triggered by banner delivery, maintenance may fail to be run if you have periods where there is no banner delivery happening;
- The impression logging script is slightly slower, as it needs to check if maintenance needs to be run;
- The only way to detect an issue with the maintenance script failing to complete is to notice one or more of the issues associated with maintenance failing to run correctly and/or manually checking the log files. With scheduled maintenance, depending on your task running system, it may be possible to have the task runner alert you in the event of the script failing to run correctly.
Info |
---|
As a result, it is recommended that you use scheduled maintenance wherever possible with Revive Adserver. |
Automatic maintenance waits for five minutes after the scheduled maintenance task was due to run. This delay ensures that any manually-scheduled maintenance has time to complete. With automatic maintenance you can:
- enable and disable automatic maintenance on the Global Settings > Maintenance page.
- view the log of maintenance runs on the My Account > User Log page.
Scheduled maintenance
Scheduling the running of the maintenance script via a task running system is considered more reliable than relying on the built-in automatic maintenance. To configure scheduled maintenance, firstly disable automatic maintenance by, as an administrator user, going to Configuration > Global Settings > Maintenance Settings and disabling automatic maintenance.
Once this is done, use a task running system (e.g. cron on Unix, Linux, Mac, etc.) to schedule the running of the maintenance script. See below for more details.
Panel | ||||
---|---|---|---|---|
| ||||
1 * * * * /path/to/php /path/to/revive_server/scripts/maintenance/maintenance.php www.example.com |
Note |
---|
Ensure that the user that the cronjob is configured to run as matches the user that owns the Revive Adserver installation, to prevent a different (e.g. root) user from creating cache files etc. which then lock out the installation owner (i.e. the web site) from changing them later on. |
If you're unable to set up a local cron job to do this (or you are unable to use the command line version of PHP), you can achieve the same effect by calling the maintenance script via the web, assuming that you:
- have access, or can obtain access, to a service which can call a URL at a recurring, pre-determined interval; and
- you have installed Revive Adserver so that http://www.example.com/path/to/revive_server/maintenance/maintenance.php is accessible from the web.
If those assumptions are true, then simply configure the appropriate URL to be called shortly after the beginning of each hour, e.g. using curl:
Panel | ||||
---|---|---|---|---|
| ||||
1 * * * * curl -s -o /dev/null http://www.example.com/path/to/revive_server/maintenance/maintenance.php |
or wget:
Panel | ||||
---|---|---|---|---|
| ||||
1 * * * * wget -q -o /dev/null http://www.example.com/path/to/revive_server/maintenance/maintenance.php |