I’ve inherited a .net/web service project that has serious connection object leaks. Oddly enough it’s been in production for quite some time with no problems until recently. I guess the garbage collector cleans them up fairly quickly ordinarily. One web server at one customers site has started running out of connections when under heavy load.
Obviously the solutions is to fix all the connection leaks, but that’s not going to happen quickly. I can’t even change the max pool setting in the connection string, the connection string is built dynamically by the app. This would require a code change which requires going through a process which is not quick.
Is there anything I can do at the server to mitigate this until a code change can happen?
Why would this be a problem at just one location, a smaller location at that? If I knew the answer to that question I might be able to figure out a temporary work around.
Is it possible the actual problem is something else entirely and it’s causing a connection pool problem? For example, perhaps the load balancing on the servers is hosed or something wrong with the web server that is having the problem.
If you are hosting this in IIS 6 or above (I think) then you can force the application pool to recycle on a scheduled basis. I had to do this with a remoting app that wasn’t closing connections to an Oracle database; we put the objects into their own application pool and then set it to recycle every hour. This worked for a few months while we tracked down the issue and released a fix.