# How to manage the pool of connections or connections?

**URL:** <https://www.ruby-forum.com/t/how-to-manage-the-pool-of-connections-or-connections/208086>\
**Category:** Deployment\
**Created:** [June 9, 2011, 10:04pm UTC](https://www.ruby-forum.com/t/how-to-manage-the-pool-of-connections-or-connections/208086 "2011-06-09T22:04:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [June 9, 2011, 10:04pm UTC](https://www.ruby-forum.com/t/how-to-manage-the-pool-of-connections-or-connections/208086/1 "2011-06-09T22:04:12Z")

</div>

The problem:

I have a user to connect the rails application to the database. This  
user has the limitation of using a single connection to the database.  
The application works fine but with evidence of some forms that perform  
multiple queries (with many screen refreshes at a time) to sail several  
different sessions open and I get the error "Too many connections to  
Role xxxx. " The error is in the database so the application does not  
control.

I do not understand much of the pool of connections but I have a  
hypothesis that as there are so many connections in the pool reaches a  
limit you want to do a new pool (new connection application) and that’s  
where I get the problem.

The setting:

Ruby 1.8.6  
Rails 2.3.9  
Apache + Passenger  
Authloghic + + Rpam AuthlogicPam

As I can solve this problem?

Thanks in advance!
