Connection pool is getting full if connection fails
---------------------------------------------------

                 Key: DNET-998
                 URL: http://tracker.firebirdsql.org/browse/DNET-998
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 7.10.1.0, 7.10.0.0
            Reporter: Silver Aid
            Assignee: Jiri Cincura


Hi!
If connection fails, the connection pool getting exhausted (even I use 
FbConnection.ClearAllPools()). Issue exists on 7.10.x.x but not in 7.5.0.0.
Example code:
**************************************************************
            int retries = 0;
            while (true)
            {
                try
                {
                    using (var con = new 
FbConnection($"User=SYSDBA;Password=xxxxx;Database=db;DataSource=localhost;Port=3553;Dialect=3;Charset=NONE;MaxPoolSize=3"))
                    {
                        con.Open();
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Connection failed: {ex.Message}");
                    if (!(ex is FbException)) break;
                    FbConnection.ClearAllPools();
                    if (retries++ >= 4)
                    {
                        Console.WriteLine("Giving up....");
                        break;
                    }
                }

            }
***********************************************************
With 7.5.0.0 the output is like expected:
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Giving up....

With 7.10.x.x the output is:
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Unable to complete network request to host "localhost".
Connection failed: Connection pool is full.

Thanks in advance.
Silver

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to