Problem with Connection Pooling?

Problem with Connection Pooling?

Old forum URL: forums.lhotka.net/forums/t/1572.aspx


tcrabb posted on Tuesday, October 24, 2006

Hi, we recently set MultipleActiveResultSets to true in our connection string as we started getting concurrency issues during load testing.  However, this has resulted in a different error - 'ExecuteReader requires an open and available Connection. The connection's current state is open.'  It works fine with only a couple of users, we start getting this error after about six users hitting the same server at the same time.  We are wondering if this has anything to do with the way that the SafeDataReader handles connections to the database?  Has anyone else experienced problems with this?

Thanks,

Toni

Bayu replied on Tuesday, October 24, 2006

Could you provide more information?

What DB do you use?
Which ADO.Net driver?

Then I'll ask my dba.

Bayu

tcrabb replied on Tuesday, October 24, 2006

We are using SQL Server 2005 with a native SQLClient connection.

Thanks.

Bayu replied on Tuesday, October 24, 2006

The verdict here is that it is recognized as a db-related issue, i.e.: MultipleActiveResultSets should work fine and it is more likely that it has something to do with your code.

Andy's suggestion sounds more like it.

Regards,
Bayu

ajj3085 replied on Tuesday, October 24, 2006

Toni,

Sounds like you're using the connection again before you've closed a reader you've run on that connection.  A connection can only support one open data reader at a time.  Make sure you're properly disposing of the reader as well.. you may not be attempting to do this, but its easy to forget to dispose objects.

Andy

Copyright (c) Marimer LLC