M
mark.ellul
Hi Everyone,
I have a problem with a system in production. Basically we are getting
timeouts on getting a connection from the connection pool... I will
give the background now...
We have a Web Server and a Database Server with the below
configurations.
Web Server
Win2k3
IIS6
Database
Win2k3
Sql Server 2000 (8.00.2039 - SP4)
We use MSMQ on the Web server to do message processing...
So we have one HTTP Application sending messages to another HTTP
Application. Lets call the first one MessageSender HTTP Application and
the other the MessageProcessor HTTP Application.
So we have asynchronous Queue Listeners in the MessageProcessor
Application, and to make sure we never get overwhelm with messages I
have implemented a thread counting approach to make sure we never have
too many threads running at one... At the moment I have set the maximum
to 5. Each thread calls a stored procedure on the Database...
Anyway for some freak reason... the queue listener stopped listening...
and we had a backlog of 8000 messages on one queue... When we restarted
the MessageProcessor the queue listener was throttles so no more than 5
threads could run and after about 300 or so messages basically it took
up the whole connection pool and then started throwing exceptions...
I managed to stop the QueueListener before it brought down the whole
application... And I had these observations ... There were similar
amounts of "sleeping" processes which only ever disappeared when the
Application Pool in IIS was recycled or after a considerable amount of
time (I am assuming Garbage Collection Kicked in).
So the simple answer is that we are not closing the connections... well
we went through the whole application and all of the connections are
closed... we tried a close and a dispose call on the
connections...Which started throwing the below error (even though we do
not reuse connection objects in each thread).
ExecuteReader requires an open and available Connection. The
connection's current state is Closed
So we do not know where to look to next...
What could be causing the connections to be held and not reused in the
connection pool, is it linked with the sleeping processes?
Any Help would be muchly appreciated...
Regards
Mark
I have a problem with a system in production. Basically we are getting
timeouts on getting a connection from the connection pool... I will
give the background now...
We have a Web Server and a Database Server with the below
configurations.
Web Server
Win2k3
IIS6
Database
Win2k3
Sql Server 2000 (8.00.2039 - SP4)
We use MSMQ on the Web server to do message processing...
So we have one HTTP Application sending messages to another HTTP
Application. Lets call the first one MessageSender HTTP Application and
the other the MessageProcessor HTTP Application.
So we have asynchronous Queue Listeners in the MessageProcessor
Application, and to make sure we never get overwhelm with messages I
have implemented a thread counting approach to make sure we never have
too many threads running at one... At the moment I have set the maximum
to 5. Each thread calls a stored procedure on the Database...
Anyway for some freak reason... the queue listener stopped listening...
and we had a backlog of 8000 messages on one queue... When we restarted
the MessageProcessor the queue listener was throttles so no more than 5
threads could run and after about 300 or so messages basically it took
up the whole connection pool and then started throwing exceptions...
I managed to stop the QueueListener before it brought down the whole
application... And I had these observations ... There were similar
amounts of "sleeping" processes which only ever disappeared when the
Application Pool in IIS was recycled or after a considerable amount of
time (I am assuming Garbage Collection Kicked in).
So the simple answer is that we are not closing the connections... well
we went through the whole application and all of the connections are
closed... we tried a close and a dispose call on the
connections...Which started throwing the below error (even though we do
not reuse connection objects in each thread).
ExecuteReader requires an open and available Connection. The
connection's current state is Closed
So we do not know where to look to next...
What could be causing the connections to be held and not reused in the
connection pool, is it linked with the sleeping processes?
Any Help would be muchly appreciated...
Regards
Mark