Connection Pooling issue in ODP.Net

Thursday, January 28, 2010 11:27 PM
Well this post addresses the connection pooling reference issue that is not handled in ODP.Net.
TO give an intro, ODP.Net is one among the data provider when you use oracle as a back end to connect from your .Net applications.  
 
I worked for a project where we used ODP.Net to connect to ORacle from Asp.net. It went well for few months till we got a critical bug saying the application is showing some yellow screen when user logs in the morning. No exceptions were logged to DB as well. We were clue less what the issue is.
 
The error we were getting was “ORA-01012: not logged on”,When the session was killed in oracle, the connection object which was part of the connection pool maintained by ODP.Net was not cleared. When a request from the website takes a connection object form the pool to connect, it failed with Not logged in Error, which is why our exception handler couldn’t handle this issue.when we traced back, there was a auto kill script that was added by our team in during the batch job processing every night to free up resources used by sessions,

 How can we handle this scenario:

 
1. You can configure in IIS to reset your application pool once before users could login to the system.
 
2. You can tweak the connection string to handle this scenario. Add an attribute Connection Lifetime which will take a value to kill all live connections in your connection pool within the idle time for your system
 

 3. Dump ODP.net and user System.Data,OracleClient

  
I will cover connection pooling concepts and the way to handle the same with connection strings in detailed in my next post.
 
 

 



  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: Connection Pooling issue in ODP.Net

I'm having the same issue, because I have an asp.net application that is on a DMZ server, so there's a firewall between webserver and dbserver, that drops idle connections after 30 mins and half closed connections after 5 mins...
I tried to set Validate Connection = true but w/o results, still having the problem. I tried Connection Lifetime to 4 mins, but still same error....
I'm using ODP.NET 11 latest release.
What can I do?
Bye All 5/28/2010 8:25 PM | lafa

Comments have been closed on this topic.