[Mono-list] MySQL connection pool timeouts

Daniel Lo Nigro lists at dan.cx
Sat Nov 2 03:46:00 UTC 2013


Turns out this was my fault and I wasn't properly closing my database
connections, so there was a large number of open connections. Microsoft
.NET seems to pool/reuse old connections better than Mono does. Modified my
database code to explicitly dispose the database connection at the end of
the request.


On Thu, Oct 31, 2013 at 11:46 PM, Daniel Lo Nigro <lists at dan.cx> wrote:

> Does anyone know what would cause this? My site is fairly low traffic so I
> don't understand how how the connection pool limits are being reached. I
> thought it may be because I was using a separate MySQL server which was
> having load issues, so I moved it to a MySQL process on the web server
> itself. Still encountering the same issue.
>
> Application Exception
> MySql.Data.MySqlClient.MySqlExceptionerror connecting: Timeout expired.
> The timeout period elapsed prior to obtaining a connection from the pool.
> This may have occurred because all pooled connections were in use and max
> pool size was reached.
>
> *Description:* HTTP 500.Error processing request.
>
> *Details:* Non-web exception. Exception origin (name of application or
> object): MySql.Data.
> *Exception stack trace:*
> at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x00000] in
> <filename unknown>:0 at MySql.Data.MySqlClient.MySqlConnection.Open ()
> [0x00000] in <filename unknown>:0
> *Version Information:* 3.0.7 (tarball Sunday 17 March 00:44:06 EST 2013);
> ASP.NET Version: 4.0.30319.17020
> Powered by Mono <http://mono-project.com/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20131101/632c87fc/attachment.html>


More information about the Mono-list mailing list