I''ve got a very low traffic site running against Oracle. The monitors show my ruby processes holding their database connections for the maximum time configured, at which time they are "sniped". I am relying on Rails to properly reconnect when necessary - I haven''t seen any errors indicating that it is *not* doing that. I''ve been asked if Rails can be configured to do its own idle connection management, closing them after a given period of time and then only reconnecting when necessary. I have no idea. Can somebody help me out? It''s a small app and a small number of connections, I think the ops guys just want to clean up their monitoring report. But, still, it''d be good information to know. Thanks! -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
On 20 May 2008, at 15:12, Duane Morin wrote:> > I''ve got a very low traffic site running against Oracle. The monitors > show my ruby processes holding their database connections for the > maximum time configured, at which time they are "sniped". I am > relying > on Rails to properly reconnect when necessary - I haven''t seen any > errors indicating that it is *not* doing that. > > I''ve been asked if Rails can be configured to do its own idle > connection > management, closing them after a given period of time and then only > reconnecting when necessary. > > I have no idea. Can somebody help me out? It''s a small app and a > small > number of connections, I think the ops guys just want to clean up > their > monitoring report. But, still, it''d be good information to know. > Thanks!There''s nothing I know about that can get Rails to close connections. Perhaps your best bet would be to get the database to time out your connections relatively quickly. As long as your ActiveRecord verification_timeout is lower you shouldn''t see any ill effects and you won''t have connections hanging around for as long. Fred --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Here''s probably more than you ever wanted to know of the subject. If you are lazy check the status of the ticket (wontfix) and then skip to the end of the comments. Then if still interested further click the link in the last comment and see why sharing connections in pools in Rails is not such a great idea. At least that seems to be the case for now. Here is another article on oracle.com that I found interesting. It doesn''t really cover the connections issues, but still have some interesting stuff in there: http://www.oracle.com/technology/pub/articles/fernandez-rails-connections.html On May 20, 10:22 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 20 May 2008, at 15:12, Duane Morin wrote: > > > > > > > I''ve got a very low traffic site running against Oracle. The monitors > > show my ruby processes holding their database connections for the > > maximum time configured, at which time they are "sniped". I am > > relying > > on Rails to properly reconnect when necessary - I haven''t seen any > > errors indicating that it is *not* doing that. > > > I''ve been asked if Rails can be configured to do its own idle > > connection > > management, closing them after a given period of time and then only > > reconnecting when necessary. > > > I have no idea. Can somebody help me out? It''s a small app and a > > small > > number of connections, I think the ops guys just want to clean up > > their > > monitoring report. But, still, it''d be good information to know. > > Thanks! > > There''s nothing I know about that can get Rails to close connections. > Perhaps your best bet would be to get the database to time out your > connections relatively quickly. As long as your ActiveRecord > verification_timeout is lower you shouldn''t see any ill effects and > you won''t have connections hanging around for as long. > > Fred--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, May 20, 2008 at 5:53 PM, Robert Walker <r0b3rt4723-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you are lazy check the status of the ticket (wontfix) and? what "ticket"? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---