Topic: Passenger/Postgresql Crash after about 8 hrs

Hi,

We are having some real problems with a Rails deployment, and I am hoping someone can give some ideas on how to resolve it.


Environment

*  Gentoo Linux OS
*  Ruby 1.8.7 
*  Rails 2.3.9
*  Postgresql 8-4
*  Apache 2.2.17
*  Passenger 2.2.15

Issue

After about eight hours the system becomes unresponsive, upon inspection we have a large number of orphaned postgres processes, and several apache processes as well.   a restart of Postgres and Apache clears up the problem, but this is obviously not a real solution. 

We have about 30 -35 clients hitting the system each hitting the system frequently(every 1-2 seconds), our postgres pool size is around 250.    As far as we can tell the rails app isn't closing the postgres connections properly, but that is just speculation at this point.  Does anyone have any ideas regarding things we can try or look at to resolve this?

Thanks