When can we use the ClearAllPools method?

I am facing the following problem:

Connection pool reached maximum number of connections

I followed all the recommendations. the problem is not the same as before, but it is rare!

I am using Using statement with all my connections and readers.

Recently, I am facing the following error and I had to reset iis fix my problem.


 Connection Pool has reached the maximum number of connections. at IBM.Data.Informix.IfxConnectionPool.ReportOpenTimeOut() at IBM.Data.Informix.IfxConnectionPool.Open(IfxConnection connection) at IBM.Data.Informix.IfxConnPoolManager.Open(IfxConnection connection) at IBM.Data.Informix.IfxConnection.Open() at DB_Connection_s.DB_Connection.GetUserSystems(String emp_num) 

Now I read about this ClearAllPools() method. But I do not know when to use this method. And if this is considered a good solution to prevent have to reset iis, to fix the request timeout problem ??

+6
source share
1 answer

You can call ClearAllPools () if you do not have an active connection.

also check out http://www.codeproject.com/Articles/46267/Connection-Pooling-in-ASP-NET

Make sure that your application correctly and consistently closes all database connections.

Make sure the database is online.

Increase connection timeout.

The error figure shows that the connections have leaked for a long period of time. To resolve this issue, make sure that your application correctly and consistently closes all database connections.

An exception does not mean that the database is down. An exception indicates a connection pool problem.

+1
source

Source: https://habr.com/ru/post/924392/


All Articles