Hi.
Getting the following exception after a network outage between client and server.
System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.PostgreSql.PgSqlConnection.Open()
at StarrPos.Common.Src.Db.PostGreSqlIO.DBConnection(ConnectionType ct, String host)
Attempting to clear connection pool once this exception is detected does not resolve the issue.
Only successful resolution is to stop the client and restart.
Note: Client is running as a service.
I believe all connections are being closed after access.
Running Devart.Data.Dll 5.0.735.0 and Devart.Data.PostgreSql.Dll 6.6.276.0 on various versions of windows.
Timeout Period Elapsed
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Timeout Period Elapsed
This exception occurs when the number of open connections is equal to the MaxPoolSize property value. So, there are no unused connections in the pool, otherwise, when opening a connection, it would have been taken from the pool and the exception would not have occurred.
If you think your connections are closed and the error is caused by the connection failure, create and send us a small test project with the corresponding DDL/DML scripts for reproducing the issue.
Please also send us the steps for reproducing the issue.
This exception can occur when you use simultaneously more connections than it is specified in the MaxPoolSize value, i.e. if you have MaxPoolSize = 100, and you have 100 open connections, all of them are used and none of them have been closed yet, then, when opening the 101st connection, we will get the specified exception. In this case clearing the pool will not help, as this method clears the pool of unused connections present in the pool, but doesn't affect the open connections.starrtec wrote:I believe all connections are being closed after access.
If you think your connections are closed and the error is caused by the connection failure, create and send us a small test project with the corresponding DDL/DML scripts for reproducing the issue.
Please also send us the steps for reproducing the issue.
Re: Timeout Period Elapsed
Test program supplied.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Timeout Period Elapsed
We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Timeout Period Elapsed
We have fixed the bug with an error occurring during opening a connection, and then this connection getting into the pool. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Timeout Period Elapsed
The new build of dotConnect for PostgreSQL 6.8.322 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=27879
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=27879