OracleLob, Connection Pooling and Timeouts

OracleLob, Connection Pooling and Timeouts

Postby Jim Gonzales » Fri 15 Oct 2010 17:35

I've created a WCF service that is used for downloading files from a blob in Oracle and I'm running into a connection timeout issue.

Currently I have the connection timeout set to 1 minute. After downloading files for a minute I'll get a connection timeout error aborting a download.

Based on what I'm seeing it would appear that the same connection is being used for all the downloads even though I create a new connection and OracleLob object each download, so if the first say 5 downloads take 50 seconds and the 6th download takes 20 seconds the connection will timeout and abort the download. (60 second timeout and to finish the last download would go beyond 60 seconds).

My current options seem to be set the timeout=0 so it won't close the connection or don't use connection pooling.

I don't have this issue with System.Data.OracleClient from Microsoft as it lets each download take up to the full 60 seconds. I was wondering if there is a third option I'm unaware of so that I can get functionality similar to Microsofts.
Jim Gonzales
 
Posts: 3
Joined: Fri 15 Oct 2010 17:16

Postby StanislavK » Mon 18 Oct 2010 13:02

The ConnectionTimeout property specifies the period to wait while trying to open a connection, not the period after which the connection will be forcibly closed. The issue may be caused by small value of the CommandTimeout property, which defines the timeout period for executing a command (e.g., retrieving a LOB). The default value for CommandTimeout is specified by the Default Command Timeout parameter of the connection string.

Please specify the following:
- the version of dotConnect for Oracle you are using;
- the exact message and the stack trace of the exception you are receiving;
- whether you are setting the 'Default Command Timeout' connection string property, and to which value;
- the values of the CommandTimeout property of the OracleCommand objects you are using.

If possible, please send us a small sample with which the problem can be reproduced so that we are able to investigate it in details.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Thanks

Postby Jim Gonzales » Tue 19 Oct 2010 13:53

Based on your reply I found the problem which turns out to be that the connection string had Connection Lifetime=60 in it.

Looking at the following article I removed it and everything is working great. Thanks for the help.

http://blogs.msdn.com/b/angelsb/archive ... 31963.aspx
Jim Gonzales
 
Posts: 3
Joined: Fri 15 Oct 2010 17:16

Postby StanislavK » Wed 20 Oct 2010 07:01

Glad to see that the problem was resolved.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle