# Oracle snipes my idle connections

**URL:** <https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588>\
**Category:** rubyonrails-talk\
**Created:** [May 20, 2008, 2:12pm UTC](https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588 "2008-05-20T14:12:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [May 20, 2008, 2:12pm UTC](https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588/1 "2008-05-20T14:12:19Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [May 20, 2008, 2:22pm UTC](https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588/2 "2008-05-20T14:22:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Walker](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@Robert\_Walker](https://discuss.rubyonrails.org/u/Robert_Walker)\
**Post date:** [May 21, 2008, 12:53am UTC](https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588/3 "2008-05-21T00:53:46Z")

</div>

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](http://www.oracle.com/technology/pub/articles/fernandez-rails-connections.html)

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [May 21, 2008, 5:46am UTC](https://discuss.rubyonrails.org/t/oracle-snipes-my-idle-connections/29588/4 "2008-05-21T05:46:59Z")

</div>

? what "ticket"?
