Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection pool timeout when the managed ThreadPool is blocked

546235Feb 6 2012 — edited Feb 8 2012

Hello,

Recently we've run into this problem when the managed ThreadPool gets overloaded (i.e. too many running/waiting tasks), then a call to OracleConnection.Open() fails with "Connection request timed out" .

Has anybody had a similar issue? Any workaround?

Here is code to reproduce the problem:

static void Main()
{
	for (var i = 0; i < 100; ++i)
	{
		ThreadPool.QueueUserWorkItem(o => Thread.Sleep(100000));
	}

	var connection = new OracleConnection(ConnectionString);
	connection.Open();
	Console.WriteLine("Opened 1");

	var connection2 = new OracleConnection(ConnectionString);
	connection2.Open();
	Console.WriteLine("Opened2");

	connection.Close();
	connection2.Close();

	Console.WriteLine("Finished.");
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2012
Added on Feb 6 2012
4 comments
984 views