CSS Keepalive Script

Unanswered Question
Apr 24th, 2007


I am writing a keepalive script, which put the service in active mode or in suspended mode, depending on a web page content, requested by the script. It works very good from active to suspended, but once in suspended mode, the keepalive script is not run anymore and therefore cannot detect the page, which should put the service back online! Is there a way for the keepalive to continue, even if a service is suspended ?

Thank you

Yves Haemmerli

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
vnovakov Wed, 04/25/2007 - 01:13

Could you please send output of your script?

show script your_script_name



Gilles Dufour Wed, 04/25/2007 - 04:52

did you capture a trace to confirm the keepalive was not running anymore ?

If a service is manually suspended, the keepalive will stop.

But if it is down, the keepalive should continue.

The interval between keepalive can change when the service is down. This time is defined with the command 'keepalive retryperiod'.

By default it is 5 sec.


yves.haemmerli Wed, 04/25/2007 - 23:42

Yes, I traced what the script does and it is clear to me that the keepalive stops if the service is put in suspended mode. I agree with you, if the service is down, the keepalive continue every retryperiod.

But I solved my problem in the following way : I created a second service, which uses another script (actually a subset of the first script), which also monitors the test pages on the server. This second script always exits with return code 0 (sucessful) and therefore never stops working. As soon the second script recognizes the character string "PORTALUP" in the test page, it sets the first service in active mode, which restarts the keepalive scheduling. It works perfectly and this allows to put a server in maintenance mode (suspend) from the server itself, without to stop existing user flows.

As this is a workaround solution, it would be better if the CSS would continue to keepalive in suspend mode...

Yves Haemmerli


This Discussion