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 ..
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 ..