Our Rails app has a lot of Postgres processes, way more than the number of Rails server processes. It hits the limit we''ve set on connections for Postgres. Why is this happening? We''ve got seven Rails processes running (using Lighttpd & FCGI). After Rails has been up for a few days, we have > 25 Postgres connection processes. Most of them look idle. We''re not using multiple databases or class-specific connections. I thought Rails only uses one connection per application instance; is this correct? Using lsof to do some digging, they''re all established connected with a dispatch.fcgi process. One of the dispatch.fcgi processes has four open connections! We do occasionally run command-line programs that require ActiveRecord to bulk load data. I thought maybe this would be a problem since I don''t explicitly close the connection on program exit, but after testing, this doesn''t appear to be the problem. It doesn''t leave a persistent connection, and all the connections are connected to dispatch processes. Any ideas what''s going on? Thanks [Rails 1.1.6; Postgres 8.1.4] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---