Focal Point
Scheduling a Server Recycle at Midnight on Windows

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7371008082

April 17, 2008, 04:16 AM
hammo1j
Scheduling a Server Recycle at Midnight on Windows
Hi

I am just wondering if anyone has a bit of code or how people recycle their servers at night.

I have to say that the server and client software is very stable and on production we never had a problem, but with test server we get the occasional problems because the code is more likely to contain bugs that create infinite loops or crashed agents.

The plan is to issue a reboot once a week at the weekend and I just wondered what others do about this.

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
April 17, 2008, 06:38 AM
GamP
I think you could use windows task management to do just that.
With that standard windows tool you can schedule either a batch job which will first stop and then start the server again.
You can do that using the NET STOP [servicename] and NET START [servicename] commands.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
April 17, 2008, 04:14 PM
Francis Mariani
This is valuable information that I've never bothered to look up, so thanks a lot GamP.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 18, 2008, 10:24 AM
PBrightwell
GamP,

Have you tried that? I would think that once the server stopped that the script could not execute the start command.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
April 21, 2008, 04:41 AM
GamP
Pat,
Yes I just tested it.
You do have to give the server a bit of extra time to completely shutdown, say something like 5 extra seconds. And then it starts up again.
My bat file looks as follows:
net stop "WebFOCUS 76 Server"
wait 5
net start "WebFOCUS 76 Server"

The wait command calls a small piece of freeware software called wait.exe that does exactly what you expect - it waits (in this case) for 5 seconds.
And this can be added to the windows tasks without a problem.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
April 21, 2008, 10:08 AM
cburtt
We run 3 WebFOCUS servers on 3 continents and have made it a Standard Operating Procedure to restart them around midnight local time every day. We've been doing this for more than 7 years through several iterations of server hardware and IBI software in each location.

The server is restarted by a simple Windows process, a Control Panel Scheduled task that runs "C:\WINDOWS\system32\shutdown.exe -f" starting in "C:\WINSOWS32" run by WebFOCUS's 'master' UserID (the one we used to install IBI's software).

This technique has served admirably to housekeep all the 'trash' from crashed agents.

Midnight, is an slow time of day when RCaster is more or less inactive with few jobs scheduled. We don't worry about Windows killing RCaster when a job is in process because our lookback setting of 3 days will detect, after the restart, that the job was submitted by RCaster to an agent for processing and was never returned 'completed', so RCaster just dispatches it again to one of the new agents.

7.6.4 supports sending e-mail notifications when any of 4 events happen (see Server Console > Workspace > Configuration > Notification). We have all 4 turned 'on' and have discovered that this schedueled restart is accompanied by Java issuing an error e-mail with subject "JSCOM3 special service crashed".
We've given each server a unique e-mail 'From' ID (see see Server Console > Workspace > Configuration > E-Mail) and send these JSCOM3 messages, and those from the other 4 notification types to an e-mail group that monitors the WebFOCUS application. The same-time-every-day appearance of 3 JSCOM3 e-mails tells us that all the platforms are running OK. An e-mail at any other time says something's wrong and a server had to 'auto-restart'. Those we investigate.

Chris


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
August 07, 2008, 08:20 PM
Michael Meagher
My question is why do we have to schedule a WebFOCUS Server restart every night? I am talking about us as a group and not me specifically. Have any of you figured out the real reason why this is necessary? It makes a big difference in performance to restart the WebFOCUS Server periodically, but it seems odd to have to do this.
August 08, 2008, 09:03 AM
GinnyJakes
It cleans up memory for one thing.

On our Unix platform, there is some caching going on and when a new user id, especially an application id, is added to the box, often the reporting server won't know about the id until the server is restarted.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 08, 2008, 12:48 PM
<JG>
Very late but to assist with cleaning up during the working day

add

crashed_cleanup = on

to edaserve.cfg this will cleanup as best it can, any resources left hanging by crashed agents.

Advantage is much less rubbish in edatemp. Disadvantage is that you must set it to off to take traces etc.