New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FirebirdSQL Connection Pooling (ADO.NET) is not Working [DNET585] #554
Comments
Modified by: @luronumenAttachment: ADONETConnectionPoolingERROR.png [ 12661 ] |
Modified by: @luronumendescription: Actual result: Expected Result: Steps to reproduce the issue: Additional Information: => Actual result: Expected Result: Steps to reproduce the issue: Additional Information: |
Modified by: @luronumendescription: Actual result: Expected Result: Steps to reproduce the issue: Additional Information: => Actual result: Expected Result: Steps to reproduce the issue: Additional Information: |
Commented by: @luronumen This issue is still reproducible on http://ADO.NET Provider v.4.6.1.0 |
Commented by: @cincuranet This is expected behavior [http://firebird.1100200.n4.nabble.com/Error-reading-data-from-the-connection-td4638893.html]. |
Commented by: @luronumen 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. I am adding below the source code that is using the Connection Pooling [connectionString()] based in the http://ADO.NET documentation. =============== public static bool ExecuteCommand(string DML) |
Commented by: alex (alexedu) Hey all! 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) ? Or something else? P.S. I have this issue with http://ASP.NET MVC + Entity Framework and also with desktop apps |
Modified by: @cincuranet |
Modified by: @cincuranet |
Commented by: @luronumen This issue is still reproducible on http://ADO.NET Provider v.5.8.0.0 (http://sourceforge.net/projects/firebird/files/firebird-net-provider/5.8.0.0/) |
Commented by: franki (franki1986) Why is this still an expected behaviour? |
Commented by: @luronumen Finally this issue was fixed in the http://ADO.NET Provider v.6.6.0 (https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/6.6.0) |
Commented by: @luronumen Sorry but this issue is still reproducible on http://ADO.NET Provider v.6.6.0 (https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/6.6.0) :( |
Commented by: bluish (bluish) If the problem is still there, this issue should be reopened, please. |
Commented by: @luronumen Hi bluish I have retested this issue on the most recent http://ADO.NET Provider v.7.0.0 (https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/7.0.0) and now the error code that is generate is: 335544721 - Unable to complete network request to host "@1" instead of the original one: 335544726 - Error reading data from the connection Not sure If a open a new issue for this will be fixed as you can see the comments of this bug (even saying that it is not reproducible on http://ADO.NET Provider v.4.5.2.0). It's been a while since I've given up Connection Pooling on my systems and I suggest you do the same on yours. :( |
Commented by: bluish (bluish) Thank you, Luciano! |
Commented by: Jeriel Lopez (jerielelopez) Hello Luciano, I do not understand why you said that it was "NOT the expected behavior". The link you gave says that this is the expected behavior. https://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.100).aspx "If a connection exists to a server that has disappeared, this connection can be drawn from the pool even if the connection pooler has not detected the severed connection and marked it as invalid. This is the case because the overhead of checking that the connection is still valid would eliminate the benefits of having a pooler by causing another round trip to the server to occur. When this occurs, the first attempt to use the connection will detect that the connection has been severed, and an ***exception is thrown.***" The previous version was adding overhead by checking if the connection was broken, and this was not the expected behavior. Anyway, even if this connection is discarded, your other connections in the pool might be broken pipes as well, so it might be best for you to clear the pool if this is detected. You would have to retry the query and let the driver generate new connections. If you use 4.6+, you will see improvements in performance, but you have to take this into account and code for it. Hope that helps someone. My source is from a great talk by Jiri Cincura at the 2019 Firebird Conference. P.s. Off topic: Not sure if you have to take this into account when using Entity Framework. I'll try to find out. |
Submitted by: @luronumen
Is duplicated by DNET667
Is related to DNET668
Attachments:
ADONETConnectionPoolingERROR.png
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 (http://ADO.NET) using the http://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 http://ADO.NET Provider v.4.5.2.0.
The text was updated successfully, but these errors were encountered: