Issue Details (XML | Word | Printable)

Key: DNET-585
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Blocker Blocker
Assignee: Jiri Cincura
Reporter: Luciano Mendes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

FirebirdSQL Connection Pooling (ADO.NET) is not Working

Created: 11/Jan/15 05:22 PM   Updated: 23/Nov/18 09:02 AM
Component/s: ADO.NET Provider
Affects Version/s: 4.6.0.0
Fix Version/s: None

File Attachments: None
Image Attachments:

1. ADONETConnectionPoolingERROR.png
(5 kB)
Environment:
Firebird 2.5.3.26780 (x64);
Windows 10 Pro;
Issue Links:
Duplicate
 
Relate
 


 Description  « Hide
Actual result:
Engine Code: 335544726
Engine Message: Error reading data from the connection.
See: ADONETConnectionPoolingERROR.png

Expected Result:
The Connection Pooling should be automatically restored when any disconnection occurs between requests;


Steps to reproduce the issue:
1- Open a FirebirdSQL Connection Pooling (ADO.NET) using the ADO.NET Provider v.4.6.0.0 (Reference: http://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.100).aspx) and do a Data request: The data is received without any issue;
2- Interupt the FirebirdSQL Server (net stop FirebirdServerDefaultInstance) and restart it (net start FirebirdServerDefaultInstance);
3- Try to request any other data from the Database using the same FirebirdSQL Connection Pooling open before.

Additional Information:
This issue did not happen when using the previous ADO.NET Provider v.4.5.2.0.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Luciano Mendes added a comment - 23/Jan/15 03:54 PM
This issue is still reproducible on ADO.NET Provider v.4.6.1.0


Luciano Mendes added a comment - 23/Jan/15 07:50 PM
Hi Jiri

It seems that I am not the only person that are facing this king of the issue since the version v.4.6.0.0.

This is NOT the expected behavior because this is NOT what happen when I am using the SQL server instead of the Firebird.
Please see the SQL Server Connection Pooling (ADO.NET) documentation available at the link https://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.100).aspx

I am adding below the source code that is using the Connection Pooling [connectionString()] based in the ADO.NET documentation.

===============
using FirebirdSql.Data.FirebirdClient;

public static bool ExecuteCommand(string DML)
        {
            using (FbConnection fbConnection = new FbConnection(connectionString()))
            using (FbCommand fbCommand = new FbCommand(DML, fbConnection))
                try
                {
                    Cursor.Current = Cursors.WaitCursor;
                    fbCommand.Connection.Open();
                    fbCommand.ExecuteNonQuery();
                    return true;
                }
                catch (FbException ex)
                {
                    return false;
                }
                finally
                {
                    Cursor.Current = Cursors.Default;
                }
        }


alex added a comment - 01/Feb/16 08:08 AM
Hey all!
I have the same issue...
It seems that something changed since 4.5.2 version.

I see that ticket is closed, but what is the solution?

Should we add now some additional connection checking?

1) Override provider method IsConnectionBroken(Exception e) ?
2) Flush pool FbConnection.ClearPool ?

Or something else?

P.S. I have this issue with ASP.NET MVC + Entity Framework and also with desktop apps

Luciano Mendes added a comment - 27/Feb/17 03:03 PM
This issue is still reproducible on ADO.NET Provider v.5.8.0.0 (http://sourceforge.net/projects/firebird/files/firebird-net-provider/5.8.0.0/)

franki added a comment - 21/Nov/18 09:09 AM
Why is this still an expected behaviour?