Ruby app hangs when no new requests come in to http server

Hello,

I am new to ruby on rails so pardon any ignorance, indiscretions, etc.
I have inherited the administration of a RoR web app that runs under
mongrel. My problem is that as long as there are http requests coming
in the application stays responsive indefinitely, however, when no
reguests come in it appears as though the app hangs. The browser times
out with:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Apache/2.0.52 (Red Hat) Server at 204.xx.xx.xx Port 80

the funny thing is that if I request an image from the /images
directory it serves the image up fine. I am running:

RHEL5 x64
Apache/2.0.52
Mongrel 1.1.3
Ruby 1.8.5

Has anyone seen this before?

~Rodre

Check your production log if there’s any error.

I think your server is rebooted. try this:

[~] crontab -e


#clear out pid files if they didn’t get erased
@reboot cd /home/username/railsapp/log && rm mongrel.4* -f

#reboot first instance (all one line)
@reboot cd /home/username/railsapp && /usr/local/bin/mongrel_rails start
-e production -d -p 40 -P
/home/username/railsapp/log/mongrel.4
0.pid

#reboot second instance (all one line)
@reboot cd /home/username/railsapp && /usr/local/bin/mongrel_rails start
-e production -d -p 41 -P
/home/username/railsapp/log/mongrel.4
1.pid

#reboot more instances in a similar manner


Be sure to triple-check that you get this file correct. Make sure your
username, railsapp, and port (4***) are plugged in correctly. Note that
the final digit of the port will increase 0,1,2,3,etc…

~~~~~~~~~~~~~~~*
Reinhart Ariando
YM : Booking2Heaven
Web: Teapoci.Blogspot.com
~~~~~~~~~~~~~~~*