Forum: Ruby on Rails Rails processes ignore SIGTERM (kill)?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2005-11-12 22:34
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
A2b2f4ee23989dc68529baef9cbddcd6?d=identicon&s=25 listbox (Guest)
on 2005-11-13 13:38
(Received via mailing list)
On 12-nov-2005, at 22:34, andreas@andreas-s.net 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
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2005-11-13 14:27
listbox wrote:
> On 12-nov-2005, at 22:34, andreas@andreas-s.net 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.
This topic is locked and can not be replied to.