# MySQL & mod\_ruby

**URL:** <https://rubytalk.org/t/mysql-mod-ruby/8310>\
**Category:** ruby-talk\
**Created:** [29 September 2003 18:36 UTC](https://rubytalk.org/t/mysql-mod-ruby/8310 "2003-09-29T18:36:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesper\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jesper\_Olsen1](https://rubytalk.org/u/Jesper_Olsen1)\
**Post date:** [29 September 2003 18:36 UTC](https://rubytalk.org/t/mysql-mod-ruby/8310/1 "2003-09-29T18:36:35Z")

</div>

Is it necessary to explicitly call the close method,  
on the handle returned my ruby-mysql’s real\_connect?

I would expect it to happen automatically when the handle goes  
out of scope.

However, on a shared MySql server I have from time to time  
gotten the error

‘real\_connect’: too many connections (MysqlError).

when trying to connect. Is this just a coincidence?

Jesper
