[Mono-devel-list] Mod_mono control panel
tauberer at for.net
Sun Feb 20 09:15:32 EST 2005
Good morning, guys. Hacking is a nice way to start the day.
After upgrading to 1.0.6/1.1.4, I found that after I "killall mono" to
restart mod-mono-server, mod_mono no longer restarts mod-mono-server on
the next request. I think this is by design, right?
Since I rely on mod_mono to start mod-mono-server, I needed a way to
restart mod-mono-server without restarting all of Apache. Rather that
writing a script to figure out what user/group mod-mono-server is
running under and what command line arguments to give it, I created a
really simple control panel within mod_mono.
It creates a new Apache handler for mono-ctrl and displays an HTML
control panel page for requests it handles. Following the one link on
the page causes mod_mono to terminate all mod-mono-servers it spawned
(exactly as in the normal termination process), and after terminating
each one and waiting one second it calls fork_mod_mono_server to restart it.
To use it, add:
And add the appropriate access controls to prevent the world from being
able to restart your mod-mono-servers.
I'm not sure if there are any memory management issues to be aware of
with forking the server a second time. This might be a good place to
put in some status information, or reporting error messages if there are
permissions problems with the socket, etc.
The patch is attached. Comments?
- Joshua Tauberer
** Nothing Unreal Exists **
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4131 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050220/f73dbf9d/attachment.bin
More information about the Mono-devel-list