-
-
Notifications
You must be signed in to change notification settings - Fork 70
Exceptions and Pool #1218
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
Comments
Other exceptions should in general be OK, because the low level code can recover from it and then it is about what the developer is going to do next. But sending/receiving bytes should still work. Do you have a repro? |
Alas no, impossible to reproduce. The only thing that made me think of it was the following stackTrace:
|
I don't see how this related to what you initially described... This looks like a regular exception when |
Yes, but in this case, the connection is put back into the Pool. But if you don't think it's possible, okay. |
Can you create repro that shows that the connection does not work after it is taken from the pool (and possibly the action that is going to happen is retried)? It is possible that there's a case that fails. |
Unfortunately, I can't see how to do this. Our application is very large and has many entry points (api). And errors occur without any apparent rule. I only get the exception globally, when it occurs (I no longer have the connection at that time). But nevertheless, I've noticed that these problems we're experiencing are “recent” and concomitant with the systematic implementation of async functions with a CancellationToken. But here again, nothing is certain. I know, it doesn't help! |
I can see how cancelling in the middle of an IO operation would leave the connection in an inconsistent state (what has been sent, what has been received?) |
Ah right. Not every |
Maybe I can just try to compile FirebirdClient (the version we are using) by replacing :
by
and rapidly test the dll in production. |
Related to #945. |
In production, our application sometimes randomly starts to malfunction.
I've noticed that once a problem has occurred, the behavior is no longer stable.
Could it be that connections are being put back into the pool when an exception has occurred, leaving the connection in an incorrect state?
In the FirebirdClient sources, in the FbConnection Close[Async] functions, I see for example:
But ConnectionBroken / IOFailed is only set to True on an IOException.
For example, in ReadAsync:
Shouldn't other exceptions also be handled? In our case, it seems that OperationCanceledException is the one that occurs.
Thanks
The text was updated successfully, but these errors were encountered: