All connections in the pool are used.

We currently have a small situation on our hands - it seems that someone forgot to close the connection in the code. The result is that the connection pool is depleted relatively quickly. As a temporary patch, we added Max Pool Size = 500;connections to our web service to our pool and restart the pool when all connections are spent until we find out.

So far we have done this:

SELECT SPId
FROM MASTER..SysProcesses
WHERE DBId = DB_ID('MyDb')  and last_batch < DATEADD(MINUTE, -15, GETDATE())

to get an SPID that has not been used for 15 minutes. Now we are trying to get the request that was last executed using this SPID with:

DBCC INPUTBUFFER(61)

but the displayed queries are different, which means either something at a basic level in which connection manipulation was broken, or our conclusion is wrong ...

Is there a mistake in our thinking here? Does DBCC / sysprocesses get the results we expect, or is there some kind of side effect? (for example, do connections in the pool affect?)

(please stick to what we can learn using SQL, since the guys who made the code are many and not all are present right now)

+5
source share
2 answers

, , "" inputbuffer, , , , . , , , GC'd .

, , use(). , . ASP- , .

, (perfmon), ? CRUD ? , .

+2

, , ""?

+1

All Articles