Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [rails] dispatch.fcgi do not exiting ..

Reply
Thread Tools

[rails] dispatch.fcgi do not exiting ..

 
 
Marcin Jurczuk
Guest
Posts: n/a
 
      11-02-2005
Helo Group.
I'm trying to setup rails with lighttpd on Linux and have strange problem

When I'm starting lighttpd fcgi processess are spawn OK.
16386 ? S 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
16387 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16388 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16389 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16390 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi

But after shutting it down:
root@ubuntu:~# rclighttpd stop
Stopping lighttpd: lighttpd.
root@ubuntu:~# ps xa|grep ruby
16387 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16388 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16389 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
16390 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/dispatch.fcgi
root@ubuntu:~#

dispatch.fcgi processes are still in process table

killing with -TERM signal dosn't help:
root@ubuntu:~# killall dispatch.fcgi && ps xa|grep dispatch|wc -l
5
root@ubuntu:~# killall -9 dispatch.fcgi
root@ubuntu:~# ps xa|grep dispatch
root@ubuntu:~#

This helps

I've tried it on Ubunut,SuSE - result is the same..

One thing ...logs showing something like this:
[02/Nov/2005:16:31:48 :: 16515] asked to terminate ASAP
[02/Nov/2005:16:31:48 :: 16514] asked to terminate ASAP
[02/Nov/2005:16:31:48 :: 16513] asked to terminate ASAP

Of course those proces never terminate without my intervention

Any ideas ? Any help ?

--
Spock ... Earth ..
 
Reply With Quote
 
 
 
 
Jamis Buck
Guest
Posts: n/a
 
      11-02-2005
This is now fixed in edge rails. TERM will always immediately exit.
However, it should be noted that shutting down this way can result in
aborted requests, causing HTTP 500 errors to be served up to the
client. Thus, the USR1 signals (which previously behaved identically
to TERM) will still behave "lazily", waiting until after the next
request to shutdown.

This should allow the listeners to behave better across a restart of
apache or lighttpd, and still allow USR1 to be used for a clean
shutdown of just the listeners.

Note that the preferred way of restarting your application is via the
USR2 signal, which causes the listeners to gracefully restart without
needing to restart your web server software. However, this approach
is known to have some issues on some platforms if your listeners are
managed by the web server itself, so it is really only recommended if
you are managing your listeners directly (via, for instance, spawn-
fcgi).

- Jamis

On Nov 2, 2005, at 8:37 AM, Marcin Jurczuk wrote:

> Helo Group.
> I'm trying to setup rails with lighttpd on Linux and have strange
> problem
>
> When I'm starting lighttpd fcgi processess are spawn OK.
> 16386 ? S 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/
> lighttpd.conf
> 16387 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16388 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16389 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16390 ? R 0:00 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
>
> But after shutting it down:
> root@ubuntu:~# rclighttpd stop
> Stopping lighttpd: lighttpd.
> root@ubuntu:~# ps xa|grep ruby
> 16387 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16388 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16389 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> 16390 ? S 0:02 /usr/bin/ruby /var/www/rmgr/public/
> dispatch.fcgi
> root@ubuntu:~#
>
> dispatch.fcgi processes are still in process table
>
> killing with -TERM signal dosn't help:
> root@ubuntu:~# killall dispatch.fcgi && ps xa|grep dispatch|wc -l
> 5
> root@ubuntu:~# killall -9 dispatch.fcgi
> root@ubuntu:~# ps xa|grep dispatch
> root@ubuntu:~#
>
> This helps
>
> I've tried it on Ubunut,SuSE - result is the same..
>
> One thing ...logs showing something like this:
> [02/Nov/2005:16:31:48 :: 16515] asked to terminate ASAP
> [02/Nov/2005:16:31:48 :: 16514] asked to terminate ASAP
> [02/Nov/2005:16:31:48 :: 16513] asked to terminate ASAP
>
> Of course those proces never terminate without my intervention
>
> Any ideas ? Any help ?
>
> --
> Spock ... Earth ..
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
loop not exiting sLim C++ 1 12-02-2009 06:50 PM
Processes not exiting ma3mju Python 14 08-10-2009 03:25 PM
Firefox not exiting (JApplet) Steven J. Sobol Java 4 09-06-2006 06:49 PM
Two Enquiries re Firefox - Sun Java & Exiting FF. Reg Mouatt Firefox 1 12-19-2004 08:37 AM
Ruby not exiting when developing extension Derek Lewis Ruby 2 12-04-2003 05:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57