1

In my IIS Server, I have many application pools (like 6 to 7) and there are many ASP.NET applications running on each of them (ex. 25 applications per pool). They all are connected with Oracle database by using ADO.NET.

All applications are just working fine, but sometimes we get error like

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.

I know the possibilities for this like we are not closing our database connections properly. So here is my headache... I don't want to go each and every project to see where we forget to close connections it is very time taking task for us.

So is there any way to identify from which application connections are remaining opened? Can we see from IIS itself? Can we make some kind of utility to track from which project connection are remaining opened?

laylarenee
  • 3,276
  • 7
  • 32
  • 40
  • Could you provide the exact error/exception text? – laylarenee Feb 24 '17 at 19:05
  • Hey laylarence thanks for the reply we got message like "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." – Rituraj RF N TF Feb 24 '17 at 19:08
  • This post details how to observe open connections: http://stackoverflow.com/questions/1043096/how-to-list-active-open-connections-in-oracle – laylarenee Feb 24 '17 at 19:13
  • 1
    I'm afraid you're just going to have to check and see if you're mishandling your connections anywhere. That's why it's so important to centralize your data access, abstract out as much repeated logic as possible, and verify you are handling them correctly in the places where you must actually hit the database. You might be able to guess at where the bad code is by examining the open connections......but most likely it's going to take a lot of detective work. – mason Feb 24 '17 at 19:20
  • Hello all , please give me a best way to short it out. – Rituraj RF N TF Feb 26 '17 at 19:32

1 Answers1

0

I'm not sure that it's a probleme of the connection to database. I think that you application are not disposing the context then the garbage collector can't clear memory. you can try to reduce the time for recylcling your application pools then check if you memory usage is decreasing or not.

was
  • 1
  • 1