BG - Ben Armstrong
2006-Jan-25 14:12 UTC
[Instiki] Log rollover: no safe shutdown of Win32 Instiki service?
I''d love to be able to turn on logging on our win32 wiki, but I can''t roll over the log the way I do on the Linux system (by simply doing a ''logrotate'' followed by a /etc/init.d/instiki restart). The trouble is, our Instiki process isn''t really a Windows service, so it won''t respond to a shutdown messages the way real Windows services do (analogous to the TERM signal sent to Instiki on Linux). If I just locate and terminate the process, Madeleine will surely be corrupted. So I am left without a way to safely roll over the log file. Thus, I can''t turn on logging. Of course, shutting down and restarting Instiki would just be one way of rolling over the log. I suppose if Instiki supported a "new log" adminstrative function that the admin could trigger from edit_web, I could have a script trigger that with an appropriately formed URL containing the administrative password. This raises a second, issue, distinct from logging: Wouldn''t an orderly shutdown or reboot of a win32 system corrupt Madeleine too? Presumably Windows attempts to shut down all of its services properly, but again, our Ruby webrick server isn''t really a Windows service, so there is no way for Windows to tell it to flush before exiting. Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instiki-users/attachments/20060125/3b36a511/attachment.htm
Assaph Mehr
2006-Jan-25 20:57 UTC
[Instiki] Log rollover: no safe shutdown of Win32 Instiki service?
Hi Ben. k> This raises a second, issue, distinct from logging: Wouldn''t an orderly > shutdown or reboot of a win32 system corrupt Madeleine too? Presumably > Windows attempts to shut down all of its services properly, but again, our > Ruby webrick server isn''t really a Windows service, so there is no way for > Windows to tell it to flush before exiting.Madeleine has proved unstable with many data corruptions. This is one of the reasons for the move to a database backup. The new Instiki should with all dmbs supported by Rails. In Pimki I have implemented a "stop service" functionality to reduce the chances of those coruptions. If you''re interested it should be simple to look at the source and extract just the relevant patch for Instiki. It will also give you a sample on how to add more admin functions to the edit web, like a log rollover. HTH, Assaph