# Connection Pooling on Rails 2.2.2 (Windows Vista)

**URL:** <https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075>\
**Category:** Rails\
**Created:** [March 5, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075 "2009-03-05T15:05:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![syuji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@syuji](https://www.ruby-forum.com/u/syuji)\
**Post date:** [March 5, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075/1 "2009-03-05T15:05:18Z")

</div>

Hi,

I’m trying to setup rails 2.2.2 pool connections to MySQL by  
specifying the pool setting with 5 in database.yml but no hope… It  
doesn’t work.  
My rails is running on webrick in the production mode and the webrick  
is launched by RadRails.

Even though I send multiple requests to my app on rails at the same  
time, it seemed only one connection is shared ( pooled ).  
I also checked on MySQL with the command “show processlist” but only  
one connection was shown.

Do I have to do something ?? or Rails on Windows cannot make multiple  
connections ??

thanks.

syuji

---

<div class="post-metadata">

**Author:** ![syuji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@syuji](https://www.ruby-forum.com/u/syuji)\
**Post date:** [March 5, 2009, 3:31pm UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075/2 "2009-03-05T15:31:09Z")

</div>

On Thu, Mar 5, 2009 at 3:23 AM, syuji [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> time, it seemed only one connection is shared ( pooled ).  
> I also checked on MySQL with the command “show processlist” but only  
> one connection was shown.
> 
> Do I have to do something ?? or Rails on Windows cannot make multiple  
> connections ??
> 
> thanks.
> 
> syuji

What does you database.yml look like? Are you seeing any error messages  
in  
the logs?

-Conrad

---

<div class="post-metadata">

**Author:** ![syuji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@syuji](https://www.ruby-forum.com/u/syuji)\
**Post date:** [March 5, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075/3 "2009-03-05T16:10:14Z")

</div>

Hi, Conrad

Thank you for the reply.

## Here is my database.yml

## production: adapter: mysql host: localhost port: 3306 pool: 5 encoding: utf8 username: testuser password: testpassword database: my\_sample\_app\_production

I don’t see any errors in the logs.  
I get proper responses from MySQL but my problem is that Rails doesn’t  
pool  
_multiple_ connections.

I forgot to mention the version of Ruby I’m using. It’s 1.8.7.  
Is there any way to check how many connections are in pool ???  
As I said earlier, I’ve checked with a “show processlist” command in  
MySQL  
console but I’m not sure that’s the best way or not.

Thanks in advance.

syuji

---

<div class="post-metadata">

**Author:** ![syuji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@syuji](https://www.ruby-forum.com/u/syuji)\
**Post date:** [March 6, 2009, 9:52am UTC](https://www.ruby-forum.com/t/connection-pooling-on-rails-2-2-2-windows-vista/162075/4 "2009-03-06T09:52:51Z")

</div>

In order to take advantage of connection pooling, you need an adapter  
that  
supports multithreading. The basic MySQL adapter doesn’t do that.

Check out [GitHub - methodmissing/mysqlplus\_adapter](http://github.com/methodmissing/mysqlplus_adapter/tree/master)  
for  
a pretty detailed walkthrough to set this up.
