On Wednesday 16 September 2009 08:14:05 am Jeremy Evans wrote: > On Sep 16, 6:24 am, Florian Aßmann <[email protected]> wrote: > > Hi there, > > > > we launched the Elbphilharmonie website half a year ago. This page > > runs on a Apache +mod_passenger with multiple ruby processes. We have > > a problem in production mode that, after some time, all SQL > > connections are used and I can't this solved. > > > > During the rails boot process all models/* are loaded, so are the > > Sequel models. Next is to fork the main process to answer requests, > > then the fork'd process connects and does not disconnect when it dies, > > imho. > > > > After some time there are lots of postgres processes and the app does > > not respond anymore. All I get is a Sequel::DatabaseDisconnectError. > > > > Does anybody have a similiar setup and, or w/o setup, can tell me how > > to solve this problem? > > A couple of ideas: > > 1) Have it set to fork before loading the database and models, instead > of after. > > 2) Call Database#disconnect right before forking. > > Jeremy
Just for reference, I have had this problem with postgres and forking in the past (sqlite didn't have this problem). I fixed it by forcing a disconnect after the fork and then letting things reconnect. I never looked into it any deeper than that since it was just a quick fork to eval a string, so I don't have anything to help on the actual root of the problem. - spox --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
