andreas-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org
2005-Nov-12 21:34 UTC
Rails processes ignore SIGTERM (kill)?
Hello, I''ve got a process that loads the environment, does some maintenace work and sleep()s a few minutes before it starts again. The problem is that I can''t kill the process with SIGTERM, I need kill -9 (SIGKILL). I noticed the same with webrick and FastCGI handlers. Why? Andreas -- Posted via http://rforum-demo.andreas-s.net/.
Julian ''Julik'' Tarkhanov
2005-Nov-13 12:35 UTC
Re: Rails processes ignore SIGTERM (kill)?
On 12-nov-2005, at 22:34, andreas-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org wrote:> Hello, > > I''ve got a process that loads the environment, does some maintenace > work > and sleep()s a few minutes before it starts again. The problem is > that I > can''t kill the process with SIGTERM, I need kill -9 (SIGKILL). I > noticed > the same with webrick and FastCGI handlers. Why?It was designed to shutdown "after the next request" when it recieves TERM. Sure enough, it was not recieving this request after lighttpd (or another FCGI manager) was stopped, therefore it just kept hanging there. This should have been fixed in the SVN. http://dev.rubyonrails.org/changeset/2847 -- Julian "Julik" Tarkhanov
listbox wrote:> On 12-nov-2005, at 22:34, andreas-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org wrote: > >> Hello, >> >> I''ve got a process that loads the environment, does some maintenace >> work >> and sleep()s a few minutes before it starts again. The problem is >> that I >> can''t kill the process with SIGTERM, I need kill -9 (SIGKILL). I >> noticed >> the same with webrick and FastCGI handlers. Why? > > It was designed to shutdown "after the next request" when it recieves > TERM.I have the problem not only with FastCGI handlers, but also with normal Rails maintenance processes that do not handle any requests. Still trying to figure out why this happens. -- Posted via http://www.ruby-forum.com/.