Is there a way to get Lighttpd to restart a FCGI process after it has served a certain number of requests like Apache? I seem to be having trouble with a memory leak (yes, I''m using FCGI 0.8.6), and my FCGI processes continue to get bigger and bigger all the time. Thanks, Wayne
On Jun 13, 2005, at 6:49 PM, Wayne Robinson wrote:> Is there a way to get Lighttpd to restart a FCGI process after it has > served a certain number of requests like Apache? > > I seem to be having trouble with a memory leak (yes, I''m using FCGI > 0.8.6), and my FCGI processes continue to get bigger and bigger all > the > time. > > Thanks, > > WayneAre you adaptively spawning them? What version of lighttpd? What''s your fastcgi config look like? - Jason
I am currently using lighttpd 1.3.13 and my config looks something like: $HTTP["host"] = "rails.domain.com" { server.document-root = "/var/www/rails.domain.com/public/", fastcgi.server = ( ".fcgi" => ( "localhost" => ( "socket" => "/tmp/rails.domain.com.sock", "bin-path" => "/var/www/rails.domain.com/public/dispatch.fcgi", "min-procs" => 5, "max-procs" => 10, "max-load-per-proc" => 10, "idle-timeout" => 60 ) ) ), server.indexfiles = ( "dispatch.fcgi", "index.html" ), server.error-handler-404 = "/dispatch.fcgi" } So, I was wondering if there is an option somewhere to get lighttpd to kill off ruby processes once they have served a certain number of requests (like PHP''s PHP_FCGI_MAX_REQUESTS environment variable). Thanks - Wayne -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jason A. Hoffman Sent: Tuesday, 14 June 2005 4:24 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Lighttpd + FCGI + Rails -> auto-restart On Jun 13, 2005, at 6:49 PM, Wayne Robinson wrote:> Is there a way to get Lighttpd to restart a FCGI process after it has > served a certain number of requests like Apache? > > I seem to be having trouble with a memory leak (yes, I''m using FCGI > 0.8.6), and my FCGI processes continue to get bigger and bigger all > the > time. > > Thanks, > > WayneAre you adaptively spawning them? What version of lighttpd? What''s your fastcgi config look like? - Jason _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> On Jun 13, 2005, at 6:49 PM, Wayne Robinson wrote: > >> Is there a way to get Lighttpd to restart a FCGI process after it has >> served a certain number of requests like Apache? >> >> I seem to be having trouble with a memory leak (yes, I''m using FCGI >> 0.8.6), and my FCGI processes continue to get bigger and bigger all >> the >> time. >> Are you adaptively spawning them? What version of lighttpd? What''s > your fastcgi config look like? > > - JasonOn Jun 13, 2005, at 11:35 PM, Wayne Robinson wrote:> > I am currently using lighttpd 1.3.13 and my config looks something > like: > > $HTTP["host"] = "rails.domain.com" { > server.document-root = "/var/www/rails.domain.com/public/", > fastcgi.server = ( > ".fcgi" => ( > "localhost" => ( > "socket" => > "/tmp/rails.domain.com.sock", > "bin-path" => > "/var/www/rails.domain.com/public/dispatch.fcgi", > "min-procs" => 5, > "max-procs" => 10, > "max-load-per-proc" => 10, > "idle-timeout" => 60 > ) > ) > ), > server.indexfiles = ( "dispatch.fcgi", "index.html" ), > server.error-handler-404 = "/dispatch.fcgi" > } > > So, I was wondering if there is an option somewhere to get lighttpd to > kill off ruby processes once they have served a certain number of > requests (like PHP''s PHP_FCGI_MAX_REQUESTS environment variable).That supposed to be what the max-load-per-proc does, but there''s still some issues with adaptive spawning (which is what min, max, max- load is). I would actually try first with it off: comment out min, max, max-load and idle-timeout. If it still happens, then try 1.3.14 curl -O http://www.lighttpd.net/download/ lighttpd-1.3.14-20050612-1303.tar.gz tar zxvf lighttpd-1.3.14-20050612-1303.tar.gz cd lighttpd-1.3.14 ./configure make make install - Jason
Thanks for the suggestions, I will try this. -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jason A. Hoffman Sent: Tuesday, 14 June 2005 8:37 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Lighttpd + FCGI + Rails -> auto-restart> On Jun 13, 2005, at 6:49 PM, Wayne Robinson wrote: > >> Is there a way to get Lighttpd to restart a FCGI process after it has >> served a certain number of requests like Apache? >> >> I seem to be having trouble with a memory leak (yes, I''m using FCGI >> 0.8.6), and my FCGI processes continue to get bigger and bigger all >> the >> time. >> Are you adaptively spawning them? What version of lighttpd? What''s > your fastcgi config look like? > > - JasonOn Jun 13, 2005, at 11:35 PM, Wayne Robinson wrote:> > I am currently using lighttpd 1.3.13 and my config looks something > like: > > $HTTP["host"] = "rails.domain.com" { > server.document-root = "/var/www/rails.domain.com/public/", > fastcgi.server = ( > ".fcgi" => ( > "localhost" => ( > "socket" => > "/tmp/rails.domain.com.sock", > "bin-path" => > "/var/www/rails.domain.com/public/dispatch.fcgi", > "min-procs" => 5, > "max-procs" => 10, > "max-load-per-proc" => 10, > "idle-timeout" => 60 > ) > ) > ), > server.indexfiles = ( "dispatch.fcgi", "index.html" ), > server.error-handler-404 = "/dispatch.fcgi" > } > > So, I was wondering if there is an option somewhere to get lighttpd to > kill off ruby processes once they have served a certain number of > requests (like PHP''s PHP_FCGI_MAX_REQUESTS environment variable).That supposed to be what the max-load-per-proc does, but there''s still some issues with adaptive spawning (which is what min, max, max- load is). I would actually try first with it off: comment out min, max, max-load and idle-timeout. If it still happens, then try 1.3.14 curl -O http://www.lighttpd.net/download/ lighttpd-1.3.14-20050612-1303.tar.gz tar zxvf lighttpd-1.3.14-20050612-1303.tar.gz cd lighttpd-1.3.14 ./configure make make install - Jason _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails