Configure server restart times
Posted by Sven Koester on 16 April 2007 12:00

PresSTORE application server requires periodical restarts in order to do some resource cleanup tasks. The server restart is performed at predefined intervals and is activated only if there are no users logged-in and no jobs running. Presstore checks for running jobs every 10 minutes. Therefore, a time window of approx. 15 minutes during which no Presstore jobs are running must be created in order for the scheduled Presstore restart to take place.

By default, server will attempt to restart every day between 04:00 and 07:00 hours. Starting with 1.5.0 release you can override this behaviour. To do this, you need to -> setup server-wide options <- controlling the restart time schedule:

ns_section ns/server/$server/module/utility
ns_param restartCron cronsspec

The "restartCron" parameter and its value encodes the schedule as follows:

day1-day2 time1-time2 ... dayX-dayY timeX-timeY


Days are enumerated 0 - 6 (0=sunday) with * denoting all days
Times are in format HH:MM (hours:minutes)

Example:

ns_section ns/server/$server/module/utility
ns_param restartCron "0-1 04:00-08:00 2-4 07:00-08:00 5 11:00-12:00"

In this example, server will attempt to restart itself on following days/times:

Sunday to Monday between 04:00 and 08:00
Tuesday to Thursday between 07:00 and 08:00
Friday between 11:00 and 12:00

If not otherwise specified, the restartCron has the default format of

* 04:00-07:00

so server restart will be attempted every day between 04:00 and 07:00 hours. After making the changes and restarting the server, look into the server log and you will be able to locate following log entries (example below is for the default restart schdedule):

[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Sun, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Mon, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Tue, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Wed, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Thu, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Fri, 04:00 - 07:00
[11/Dec/2004:16:58:21][9483.10][-ns_job_0-] Notice: Attempt restart on Sat, 04:00 - 07:00

(955 vote(s))
Helpful
Not helpful

Comments (2)
Robinson Rozas
12 July 2013 14:20
Hello Sven
I've been trying to do the procedure that you describe, but server shows me a message "ns_section: command not found"
Some help?
Andre Kuehnemund
19 November 2013 16:53
Please create a support ticket and include the support data from your Presstore server.
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

ERROR: This domain name (portal.archiware.com), does not match the domain name in the license key file support.archiware.com.

For assistance with your license, please contact the Kayako support team: https://support.kayako.com