Timeout Period Elapsed

Timeout Period Elapsed

Postby starrtec » Thu 29 Aug 2013 21:44

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.
starrtec
 
Posts: 2
Joined: Thu 29 Aug 2013 21:26

Re: Timeout Period Elapsed

Postby Pinturiccio » Fri 30 Aug 2013 13:52

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.

starrtec wrote:I believe all connections are being closed after access.

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.

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.
Pinturiccio
Devart Team
 
Posts: 2024
Joined: Wed 02 Nov 2011 09:44

Re: Timeout Period Elapsed

Postby starrtec » Mon 02 Sep 2013 04:04

Test program supplied.
starrtec
 
Posts: 2
Joined: Thu 29 Aug 2013 21:26

Re: Timeout Period Elapsed

Postby Pinturiccio » Mon 02 Sep 2013 13:59

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 2024
Joined: Wed 02 Nov 2011 09:44

Re: Timeout Period Elapsed

Postby Pinturiccio » Wed 04 Sep 2013 12:22

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.
Pinturiccio
Devart Team
 
Posts: 2024
Joined: Wed 02 Nov 2011 09:44

Re: Timeout Period Elapsed

Postby Pinturiccio » Fri 06 Sep 2013 08:21

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/postgresql/download.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
Pinturiccio
Devart Team
 
Posts: 2024
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for PostgreSQL