none
MySql Connector is not working properly RRS feed

  • Question

  • I have a small web application that uses MySql.Data.dll (MySql connector 5.1.3) to connect to MySql database, I have used connection pooling too. My sample connectionstring is

    <add key="myconn" value="server=localhost;database=mysqldatabase;uid=root;password=root;Pooling=true; Min Pool Size=0;Max Pool Size=10;Connect Timeout=8;" />

    Everything works great when there is few users on the website.

    But when the users increases (say 100 users), it throws different different errors. like

    "Unable to connect to any of the specified MySQL hosts"
    or
    "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."
     etc.

    Anyone has any idea which provider is better to use to connect to MySql OR why I am getting above error?

    I have tried Using statement to all objects (MySqlConnection, MySqlCommand) and also tried Try Catch Finally to ensure that all objects are manually closed and disposed. But no luck.

    Sheo Narayan
    Wednesday, February 18, 2009 6:52 PM

All replies