Timeout problem with SS2K, VS03

D

DCraig

I'm working with SS2000 on Server2003, Visual Studio 03 on XP and getting a
timeout issue that I cannot identify the source of.

The specific message is
"General error getting subscriptions" (or other table)


"Timeout expired. The timeout period elapsed prior to obtaining a
connection from the pool. This may have occurred because all pooled
connections were in use and max pool size was reached."


There's quite a bit of code so rather than try to post the whole lot I'm
going to try to describe it, basically when this happens there's multiple
classes and forms running (basically it's a form editing a related entity
from a main form, each with multiple classes). After editing data in the
subclass, the code saves to the database within a transaction, the
transaction is committed and the connection is closed cleanly and all
appears to be well. Occasionally, however, after editing and saving from
the subform I get the above message and once that happens, I cannot seem to
connect to the database until I close that copy of the application.

What I've tried to figure out so far; initially I believed the error message
that the pool max size was reached. This does not appear to be true; the
timeout only effects this instance of the application, I can connect with
other applications or other instances of the same application with no
problem. So unless the pool is something within the scope of the
application, the message is incorrect.

When I look at sp_who2 for blocking, none shows.

When I trace my calls to the server with sql profiler, the queries never
reach the server, which (I believe) indicates that it's a problem with the
application rather than a server setting. It's almost as if the connection
string stops working but we get that from app.config so I don't see how it
could change from one call to the next.

Similarly, waiting a few minutes and trying the same search again from the
application makes no difference. Because the 'timeout' appears indefinite,
rather than just a long running query, I don't believe tweaking timout
settings will help. The queries take at most a few seconds when it's
working, yet once I hit the exception not even the shortest query will run.

I tried to reduce the number of connections used, and initially that seemed
to help, but not eliminate the error. But the number I'm dealing with is
ridiculously small, I pass the connection by reference to the subclasses so
I went from using 3 total to using only 2.

Searching the web I found that if I have SQL Debugging enabled that would
cause the error, sure enough in this project I did have it enabled so I
disabled it and thought that I had fixed the problem. But after a day or so
the problem cropped up again, and SQL Debugging is still disabled.

So everywhere I turn appears to be a blind alley; it's does not appear to be
the connection pool, it's definitely not a long running query and it's not a
connection or connections being left open that I can see. SQL Debugging is
not enabled and I'm running out of places to look for the source of this
problem.

Has anyone else seen this type of timeout error? If not does anyone have
any idea where I can look from here?

Thanks for listening;

David Craig
ABC-Clio.
 
D

DCraig

I believe I found the source of this problem; while trying to track it down
I noticed calls in sql profiler:
exec sp_sdidebug

This is the server side debug stored procedure. Going through each
project's properties in the application I found that the output project did
indeed have sql server debugging enabled - even though I *know* I went
through each project properties when I found it set to true on a subproject
to be sure I'd got them all. So it appears that it was 'unset' somehow on a
project, regardless, now I know how to see if it is enabled without having
to check each project (look for sp_sdidebug in profiler).

I hope this helps someone out there;

DCraig.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top