From: Jamis Buck Date: 2004-11-23T07:59:34+09:00 Subject: Re: fast shutdown of webrick David Heinemeier Hansson wrote: >> Is this an ok way to shut it down? >> >> btw: Any clues how to quickly restart webrick ? > > > I'm pretty interested in the answer to both of these questions :). The > WEBrick servlet will be the preferred development platform from the next > version of Rails (with really nice integrated breakpoint support and > more!), so we're looking to make the experience as nice as possible. > > (Yes, you can and should still deploy production apps on Apache) I haven't done any exhaustive research into this topic, but this is what I've observed, along with my speculative conclusions: 1) When the last request to WEBrick results in an exception, I can shutdown WEBrick and it terminates quite snappily. 2) When the last request to WEBrick is successful (with no raised exception), WEBrick can take up to a minute to actually terminate. I *suspect* that this has something to do with the browser keeping the connection to WEBrick alive. Perhaps WEBrick can't shut down as long as there is an active connection, and it has to wait for that connection to time out? Can anyone comment on how feasible this might be? - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis