Npgsql connection not releasing

490 Views Asked by At

I have a client app using Entity Framework Core 5 with Npgsql to access PostgreSQL. The client app may make multiple connections to the database.

The problem is, after we killed the client app and shutdown the client machine, we can still see the connections from pgAdmin dashboard on the server.

We should not see these connection in pgAdmin as the client app is totally shutdown, does anyone know what is happening?

Is it because we kill the client app during a transaction or during a query wait?

If we inspect the connection query then we can see that it is performing a select statement. We suspect that it is waiting for another transaction to complete before returning the data but the client was killed and it didn't know about that. Would this be a right assumption?

0

There are 0 best solutions below