[Glass] Swazoo server hangs
Johan Brichau
johan at yesplan.be
Fri Nov 15 12:20:58 PST 2013
Hi Otto,
To check if a fastcgi process is up-and-running, you can use monit [1] with the following configuration. I believe I found this online somewhere, perhaps [2].
You will want to adapt the <code to start the seaside gem> part. I just copy/pasted from our configuration and removed that command since we have specific scripts for our setup. I believe it should be something like this: "startSeaside30Adaptor FastCGI 9001".
Here is the part for monit. Just copy/paste it for each fastcgi port you are running.
check process fastcgi_9001 with pidfile /opt/gemstone/product/seaside/data/FastCGI_server-9001.pid
start program = "<code to start the seaside gem>" as uid sites and gid sites
stop program = "<code to stop the seaside gem>" as uid sites and gid sites
# Empty FastCGI request
if failed port 9001
# Send FastCGI packet: version 1 (0x01), cmd FCGI_GET_VALUES (0x09)
# padding 8 bytes (0x08), followed by 8xNULLs padding
send "\0x01\0x09\0x00\0x00\0x00\0x00\0x08\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00"
# Expect FastCGI packet: version 1 (0x01), resp FCGI_GET_VALUES_RESULT (0x0A)
expect "\0x01\0x0A"
timeout 10 seconds
then restart
Hope this helps!
Johan
[1] http://mmonit.com/monit/
[2] http://richard.wallman.org.uk/2010/03/monitor-a-fastcgi-server-using-monit/
On 13 Nov 2013, at 12:18, Otto Behrens <otto at finworks.biz> wrote:
> Has anyone got some script that checks if a fast gci server is up?
More information about the Glass
mailing list