Chris Hall
2006-Aug-10 11:17 UTC
[Mongrel] mongrel stops responding after period of no use
I just moved from apache2/fcgi to apache2.2/mongrel and everything seems to work great except for 2 issues, one being major and one minor. the major issue i am experiencing is that after a period of time where my rails apps are not used, typically overnight, the mongrel processes become unresponsive. I currently have 3 apps running behind an apache2.2 proxy. every morning when i come in to work, all 3 apps no longer respond, either via apache or even if i try to connect directly to the port the app is running on. i start each mongrel instance as: cd <path to app> mongrel_rails start -e production -p <port> -d i see nothing in any of the log files to indicate a problem other than this is the apache error log i have setup for each app: [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error reading status line from remote server localhost [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error reading from remote server returned by / [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: HTTP: attempt to connect to [::1]:3010 (localhost) failed [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling worker for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection for (localhost) each app is setup in it''s own virtual host directive with: ProxyRequests Off ProxyPass / http://localhost:<port>/ ProxyPassReverse / http://localhost:<port>/ ProxyPreserveHost On RewriteEngine On RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] with <port> being the port specific the app. i wind up having to kill each process and restarting, then restart apache. also, the minor issue, is that when i start mongrel_rails with a configuration file, the pid file never gets created, yet the log file does, and they are set to the default location, log/mongrel.log and log/mongrel.pid in this case it''s only a minor inconvenience, because i can just run: ps -C mongrel_rails -o pid= |xargs kill -9 to kill the processes so i can restart. i have since switched to starting mongrel from the command line as the pid file will get created when used this way. installed gems: actionmailer (1.2.3, 1.2.2, 1.1.5) Service layer for easy email delivery and testing. actionpack (1.12.3, 1.12.2, 1.11.2) Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.1.4, 1.1.3, 1.0.0) Web service support for Action Pack. activerecord (1.14.3, 1.13.2) Implements the ActiveRecord pattern for ORM. activesupport (1.3.1, 1.2.5) Support and utility classes used by the Rails framework. cmdparse (2.0.0) Advanced command line parser supporting commands daemons (0.4.4) A toolkit to create and control daemons in different ways gem_plugin (0.2.1) A plugin system based only on rubygems that uses dependencies only login_generator (1.1.0) [Rails] Login generator. mongrel (0.3.13.3) A small fast HTTP library and server that runs Rails, Camping, and Nitro apps. rails (1.1.4, 1.1.3, 1.0.0) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.1, 0.7.0) Ruby based make-like utility. sources (0.0.1) This package provides download sources for remote gem installation any help would be greatly appreciated. Chris
Jason A. Hoffman
2006-Aug-10 11:41 UTC
[Mongrel] mongrel stops responding after period of no use
What''s the database backend? Regards, J On Aug 10, 2006, at 4:17 AM, Chris Hall wrote:> I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. > > i start each mongrel instance as: > > cd <path to app> > mongrel_rails start -e production -p <port> -d > > i see nothing in any of the log files to indicate a problem other than > this is the apache error log i have setup for each app: > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > reading status line from remote server localhost > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > reading from remote server returned by / > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > HTTP: attempt to connect to [::1]:3010 (localhost) failed > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > worker for (localhost) > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > for (localhost) > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > for (localhost) > > each app is setup in it''s own virtual host directive with: > > ProxyRequests Off > ProxyPass / http://localhost:<port>/ > ProxyPassReverse / http://localhost:<port>/ > ProxyPreserveHost On > RewriteEngine On > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > with <port> being the port specific the app. > > i wind up having to kill each process and restarting, then restart > apache. > > also, the minor issue, is that when i start mongrel_rails with a > configuration file, the pid file never gets created, yet the log file > does, and they are set to the default location, log/mongrel.log and > log/mongrel.pid > > in this case it''s only a minor inconvenience, because i can just run: > > ps -C mongrel_rails -o pid= |xargs kill -9 > > to kill the processes so i can restart. i have since switched to > starting mongrel from the command line as the pid file will get > created when used this way. > > installed gems: > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > Service layer for easy email delivery and testing. > > actionpack (1.12.3, 1.12.2, 1.11.2) > Web-flow and rendering framework putting the VC in MVC. > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > Web service support for Action Pack. > > activerecord (1.14.3, 1.13.2) > Implements the ActiveRecord pattern for ORM. > > activesupport (1.3.1, 1.2.5) > Support and utility classes used by the Rails framework. > > cmdparse (2.0.0) > Advanced command line parser supporting commands > > daemons (0.4.4) > A toolkit to create and control daemons in different ways > > gem_plugin (0.2.1) > A plugin system based only on rubygems that uses dependencies only > > login_generator (1.1.0) > [Rails] Login generator. > > mongrel (0.3.13.3) > A small fast HTTP library and server that runs Rails, Camping, and > Nitro apps. > > rails (1.1.4, 1.1.3, 1.0.0) > Web-application framework with template engine, control-flow > layer, > and ORM. > > rake (0.7.1, 0.7.0) > Ruby based make-like utility. > > sources (0.0.1) > This package provides download sources for remote gem installation > > > any help would be greatly appreciated. > > Chris > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
Chris Hall
2006-Aug-10 12:09 UTC
[Mongrel] mongrel stops responding after period of no use
mysql 5.0.22 Chris On 8/10/06, Jason A. Hoffman <jason at joyent.com> wrote:> What''s the database backend? > > Regards, J > > On Aug 10, 2006, at 4:17 AM, Chris Hall wrote: > > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > > > the major issue i am experiencing is that after a period of time where > > my rails apps are not used, typically overnight, the mongrel processes > > become unresponsive. I currently have 3 apps running behind an > > apache2.2 proxy. every morning when i come in to work, all 3 apps no > > longer respond, either via apache or even if i try to connect directly > > to the port the app is running on. > > > > i start each mongrel instance as: > > > > cd <path to app> > > mongrel_rails start -e production -p <port> -d > > > > i see nothing in any of the log files to indicate a problem other than > > this is the apache error log i have setup for each app: > > > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > > reading status line from remote server localhost > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > > reading from remote server returned by / > > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > > HTTP: attempt to connect to [::1]:3010 (localhost) failed > > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > > worker for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > > > each app is setup in it''s own virtual host directive with: > > > > ProxyRequests Off > > ProxyPass / http://localhost:<port>/ > > ProxyPassReverse / http://localhost:<port>/ > > ProxyPreserveHost On > > RewriteEngine On > > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > > > with <port> being the port specific the app. > > > > i wind up having to kill each process and restarting, then restart > > apache. > > > > also, the minor issue, is that when i start mongrel_rails with a > > configuration file, the pid file never gets created, yet the log file > > does, and they are set to the default location, log/mongrel.log and > > log/mongrel.pid > > > > in this case it''s only a minor inconvenience, because i can just run: > > > > ps -C mongrel_rails -o pid= |xargs kill -9 > > > > to kill the processes so i can restart. i have since switched to > > starting mongrel from the command line as the pid file will get > > created when used this way. > > > > installed gems: > > > > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > > Service layer for easy email delivery and testing. > > > > actionpack (1.12.3, 1.12.2, 1.11.2) > > Web-flow and rendering framework putting the VC in MVC. > > > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > > Web service support for Action Pack. > > > > activerecord (1.14.3, 1.13.2) > > Implements the ActiveRecord pattern for ORM. > > > > activesupport (1.3.1, 1.2.5) > > Support and utility classes used by the Rails framework. > > > > cmdparse (2.0.0) > > Advanced command line parser supporting commands > > > > daemons (0.4.4) > > A toolkit to create and control daemons in different ways > > > > gem_plugin (0.2.1) > > A plugin system based only on rubygems that uses dependencies only > > > > login_generator (1.1.0) > > [Rails] Login generator. > > > > mongrel (0.3.13.3) > > A small fast HTTP library and server that runs Rails, Camping, and > > Nitro apps. > > > > rails (1.1.4, 1.1.3, 1.0.0) > > Web-application framework with template engine, control-flow > > layer, > > and ORM. > > > > rake (0.7.1, 0.7.0) > > Ruby based make-like utility. > > > > sources (0.0.1) > > This package provides download sources for remote gem installation > > > > > > any help would be greatly appreciated. > > > > Chris > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Charles Brian Quinn
2006-Aug-10 12:14 UTC
[Mongrel] mongrel stops responding after period of no use
Do you have any special log rotation on apache that occurs nightly? p.s. upgrade rails to 1.1.5 On 8/10/06, Jason A. Hoffman <jason at joyent.com> wrote:> What''s the database backend? > > Regards, J > > On Aug 10, 2006, at 4:17 AM, Chris Hall wrote: > > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > > > the major issue i am experiencing is that after a period of time where > > my rails apps are not used, typically overnight, the mongrel processes > > become unresponsive. I currently have 3 apps running behind an > > apache2.2 proxy. every morning when i come in to work, all 3 apps no > > longer respond, either via apache or even if i try to connect directly > > to the port the app is running on. > > > > i start each mongrel instance as: > > > > cd <path to app> > > mongrel_rails start -e production -p <port> -d > > > > i see nothing in any of the log files to indicate a problem other than > > this is the apache error log i have setup for each app: > > > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: error > > reading status line from remote server localhost > > [Mon Aug 07 06:29:42 2006] [error] [client xx.xx.xx.xx] proxy: Error > > reading from remote server returned by / > > [Mon Aug 07 06:29:42 2006] [error] (111)Connection refused: proxy: > > HTTP: attempt to connect to [::1]:3010 (localhost) failed > > [Mon Aug 07 06:29:42 2006] [error] ap_proxy_connect_backend disabling > > worker for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > [Mon Aug 07 06:29:42 2006] [error] proxy: HTTP: disabled connection > > for (localhost) > > > > each app is setup in it''s own virtual host directive with: > > > > ProxyRequests Off > > ProxyPass / http://localhost:<port>/ > > ProxyPassReverse / http://localhost:<port>/ > > ProxyPreserveHost On > > RewriteEngine On > > RewriteRule "^(images|stylesheets|javascripts)/?(.*)" "$0" [L] > > > > with <port> being the port specific the app. > > > > i wind up having to kill each process and restarting, then restart > > apache. > > > > also, the minor issue, is that when i start mongrel_rails with a > > configuration file, the pid file never gets created, yet the log file > > does, and they are set to the default location, log/mongrel.log and > > log/mongrel.pid > > > > in this case it''s only a minor inconvenience, because i can just run: > > > > ps -C mongrel_rails -o pid= |xargs kill -9 > > > > to kill the processes so i can restart. i have since switched to > > starting mongrel from the command line as the pid file will get > > created when used this way. > > > > installed gems: > > > > > > actionmailer (1.2.3, 1.2.2, 1.1.5) > > Service layer for easy email delivery and testing. > > > > actionpack (1.12.3, 1.12.2, 1.11.2) > > Web-flow and rendering framework putting the VC in MVC. > > > > actionwebservice (1.1.4, 1.1.3, 1.0.0) > > Web service support for Action Pack. > > > > activerecord (1.14.3, 1.13.2) > > Implements the ActiveRecord pattern for ORM. > > > > activesupport (1.3.1, 1.2.5) > > Support and utility classes used by the Rails framework. > > > > cmdparse (2.0.0) > > Advanced command line parser supporting commands > > > > daemons (0.4.4) > > A toolkit to create and control daemons in different ways > > > > gem_plugin (0.2.1) > > A plugin system based only on rubygems that uses dependencies only > > > > login_generator (1.1.0) > > [Rails] Login generator. > > > > mongrel (0.3.13.3) > > A small fast HTTP library and server that runs Rails, Camping, and > > Nitro apps. > > > > rails (1.1.4, 1.1.3, 1.0.0) > > Web-application framework with template engine, control-flow > > layer, > > and ORM. > > > > rake (0.7.1, 0.7.0) > > Ruby based make-like utility. > > > > sources (0.0.1) > > This package provides download sources for remote gem installation > > > > > > any help would be greatly appreciated. > > > > Chris > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com
Wilson Bilkovich
2006-Aug-10 15:15 UTC
[Mongrel] mongrel stops responding after period of no use
On 8/10/06, Chris Hall <christopher.k.hall at gmail.com> wrote:> I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. >I ran into this the other day. I''m fairly sure it''s an Apache bug, potentially this one: http://issues.apache.org/bugzilla/show_bug.cgi?id=37770 I upgraded from 2.2.2 to 2.2.3, and it happens much less frequently now.
On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote:> I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor. > > the major issue i am experiencing is that after a period of time where > my rails apps are not used, typically overnight, the mongrel processes > become unresponsive. I currently have 3 apps running behind an > apache2.2 proxy. every morning when i come in to work, all 3 apps no > longer respond, either via apache or even if i try to connect directly > to the port the app is running on. >Two things can cause this: apache bug that Wilson mentioned, or that your MySQL adapter needs to be told to reduce it''s timeout time. Don''t remember the magic incantation but it was mentioned several times in the list (gotta get that in the damn FAQ) <snip>> also, the minor issue, is that when i start mongrel_rails with a > configuration file, the pid file never gets created, yet the log file > does, and they are set to the default location, log/mongrel.log and > log/mongrel.pid >Upgrade to the 0.3.13.4 pre-release and this will be fixed: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?
On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote:> I just moved from apache2/fcgi to apache2.2/mongrel and everything > seems to work great except for 2 issues, one being major and one > minor.ActiveRecord::Base.verification_timeout = 14400 This is the option to try in environment.rb -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?
Chris Hall
2006-Aug-10 17:03 UTC
[Mongrel] mongrel stops responding after period of no use
thanks all, i will give the mysql timeout one a try first, see if that helps then go from there. Chris. On 8/10/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> On Thu, 2006-08-10 at 07:17 -0400, Chris Hall wrote: > > I just moved from apache2/fcgi to apache2.2/mongrel and everything > > seems to work great except for 2 issues, one being major and one > > minor. > > ActiveRecord::Base.verification_timeout = 14400 > > This is the option to try in environment.rb > > > -- > Zed A. Shaw > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.railsmachine.com/ -- Need Mongrel support? > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >