Skip to content

Exceptions and Pool #1218

Description

@ftrl

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:

var broken = _innerConnection.Database.ConnectionBroken;
FbConnectionPoolManager.Instance.Release(_innerConnection, !broken);

But ConnectionBroken / IOFailed is only set to True on an IOException.
For example, in ReadAsync:

catch (IOException)
{
IOFailed = true;
throw;
}

Shouldn't other exceptions also be handled? In our case, it seems that OperationCanceledException is the one that occurs.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions