Every once in a while, IIS stops serving my Web Tools 2007.0.625 website, and, after 30 seconds of nothing, instead delivers a very unfriendly ASP.NET message:
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.
I run a scheduled task that resets IIS every 24 hours just in case this happens, but it seems that it's taking about six hours to happen, and I imagine that this will increase as traffic to my site increases too. I don't want to have to reset the website every hour just because of a leak - doing so would wreak havoc on customer satisfaction.
From the limited understanding I have of SQL connectivity persistence, this happens when connections are not explicitly closed in Web Tools code (If this is the case, it seems that an upgrade to SP1 is in order - can someone confirm or deny this?). My best guess is that the server has some stray connections that aren't being closed, and so they get hung onto for the open connection timeout period (20 minutes?) until they're released automatically by a type of SQL connection garbage collector. In the meantime, there are only a limited number of connections available for pooling like this, and they get eaten up and hogged by a first-come-first-served process.
I don't want to set the max pool size to something high, as it might bog the machine down too much. Of course, not pooling connections is suicide. Has anybody else seen this? What should I do?