Running Rails (0.13.1) under WinXP with local MySQL database for all but one model. One model accesses a remote Oracle db and it seems to work fine. Here''s the model/stuff.rb file: class Stuff < ActiveRecord::Base set_table_name "stuff_table_name" set_primary_key "stuff_id" establish_connection( :adapter => "oci", :host => "aaaa", :username => "stuff_user", :password => "stuff_user" ) end I just learned that I have a number of unclosed sessions on the Oracle db server. What is the proper method of closing a session? I see the AR method "remove_connection", but I''m not sure where it would go. Any help is appreciated since it''s A Bad Thing(TM) to piss off a DBA, right? -cal
Do you use WebRick or Apache/FastCGI ? -----Original Message----- I just learned that I have a number of unclosed sessions on the Oracle db server. What is the proper method of closing a session? I see the AR method "remove_connection", but I''m not sure where it would go. Any help is appreciated since it''s A Bad Thing(TM) to piss off a DBA, right? -cal
On 8/23/05, Faissolle, Julien <Julien.Faissolle-VXdhtT5mjnY@public.gmane.org> wrote:> Do you use WebRick or Apache/FastCGI ? > > -----Original Message----- > > I just learned that I have a number of unclosed sessions on the Oracle > db server. What is the proper method of closing a session? I see the > AR method "remove_connection", but I''m not sure where it would go. Any > help is appreciated since it''s A Bad Thing(TM) to piss off a DBA, right? > > -calI have an identical problem on webrick + mysql, one model is using a different db connection and keeps opening new connections. From what I managed to google it seems that it''s a webrick problem, is that right?
There used to be a problem for all db connections opened in the Webrick environment. This is supposed to be fixed with ticket #1685 in version 13.1. If you use Rails version 13.1, perhaps there is still a bug for explicit additional connections ? -----Original Message-----> Do you use WebRick or Apache/FastCGI ? > > -----Original Message----- > > I just learned that I have a number of unclosed sessions on the Oracle> db server. What is the proper method of closing a session? I see the> AR method "remove_connection", but I''m not sure where it would go. > Any help is appreciated since it''s A Bad Thing(TM) to piss off a DBA,right?> > -calI have an identical problem on webrick + mysql, one model is using a different db connection and keeps opening new connections. From what I managed to google it seems that it''s a webrick problem, is that right?
Faissolle, Julien wrote:>There used to be a problem for all db connections opened in the Webrick >environment. This is supposed to be fixed with ticket #1685 in version >13.1. If you use Rails version 13.1, perhaps there is still a bug for >explicit additional connections ? > > >I''ve found that in development mode (using WEBrick) that each request opens a new connection and they aren''t released (GC''ed?) until you stop the WEBrick server (I''m on WinXP)