donderdag 14 maart 2013
C# oracle connection pool problems
The Oracle C# driver is not smart enough to check whether a connection is still active in the connection pool. This makes it possible for the C# code to get an disconnected connection when you open een new connection to Oracle.
One possible solution given on the Internet is using the "Validate Connection=true;" in your connection string. However, that does not solve your problem at all.
The only way to solve the problem is to add this string to your connection string:
"Min Pool Size=0;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=3;"
This means: The minimum Pool size is 0, and eventually the Pool size will become 0 when no activity is going on for some time. Works great.
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten