[Mongrel] mongrel stops responding after period of no use

Jason A. Hoffman jason at joyent.com
Thu Aug 10 07:41:27 EDT 2006


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



More information about the Mongrel-users mailing list