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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
