Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle Datasource returning null connection

The oracle data source is returning null connection when the no of connection request is more. I have the implict cache enabled.The oracle specs says null is returned only is ConnectionWaitTimeout is set. I do not have a value set for ConnectionWaitTimeout in the cache properties.

This is what the spec says about

ConnectionWaitTimeout

Specifies cache behavior when a connection is requested and there are already MaxLimit connections active. If ConnectionWaitTimeout is greater than zero, then each connection request waits for the specified number of seconds or until a connection is returned to the cache. If no connection is returned to the cache before the timeout elapses, then the connection request returns null.

Default: 0 (no timeout)

What are other possiblies where the Datasource could return a null connection?

like image 638
Java Guy Avatar asked Mar 30 '09 20:03

Java Guy


1 Answers

I think the default may vary depending on what version of Oracle you are using. Some of the information is contradictory, e.g. Oracles "Optimizing Connection Pool Behavior" implies the default is 3 seconds (11g?) wheras other sources state that it is zero as mentioned in the question.

I'd suggest explicitly setting it to zero and see if the behavior still manifests itself.

like image 135
BenM Avatar answered Oct 02 '22 10:10

BenM