Trying to nail down "MaxPoolSize" errors...

by kittH at 2013-02-07 08:55:37

I’ve been trying to find the cause of some MaxPoolSize errors we’ve received on some Win08R2 webservers.

I believe it is being caused by SQL connections not being closed properly by some function of an application.

Is there a way to enumerate the current open connections/connection pools with powershell so I can try to determine the source of this issue?
by DonJ at 2013-02-07 09:35:01
Not readily. SQL Server doesn’t have a strong set of commands for that, although 2012 adds a pretty comprehensive provider. You’d end up needing to pull that information from SMO. Frankly… it’s probably easier to monitor in SQL Server Management Studio, which has a pretty good GUI you can leave open and watch for problems as you’re troubleshooting.
by kittH at 2013-02-07 09:54:11
Thanks Don, that’s the angle we’ve been approaching it from, but I thought it was worth checking if there was a better way to look from the IIS side.
by DonJ at 2013-02-07 10:01:43
Nothing in the IIS side will show you open connections to SQL; IIS doesn’t “know” a connection has been made. The code running in an app pool is pretty opaque. The most you could do, short of finding the problem and fixing the code, is schedule more frequent worker thread recycling. SQL is pretty capable when it comes to closing old connections, you just gotta ditch the threads that are consuming memory.