Forum Moderators: open
All connections are explicitly closed by calling .Close method, and then they are disposed by calling .Dispose method, and, finally, set to Nothing. The thing is that, this happens even for 1 user – me, sitting on the development server (or development workstation), I`m the only user who makes any connections, and I`m executing 1 SQL stored procedure call per 1 connection opening, full closing-disposing-nothining block. All procedures are simple selects or inserts, which execute in no time. Time span between those actions is quite sufficient for the server to understand that I`m the only user, and that connection attributes have not changed, so it should be pooled. Nevertheless after making 2 – 4 runs to the database and looking into “SQL Server --> Current Activity --> Process info” I see 100 items long list of connections assigned to me.
Well I`ve tried to give as full problem description as possible, please ask me if I`ve forgotten something.
much to your dismay, something is not happening the way you describe it. if you're finding 100 connections open after only 2-4 trips to the DB, something just ain't right.
as a short term fix, up your max connection pool setting in your web.config, and then walk away from your code for a day, and come back. search absolutely everything for possible connections that stay open.
also, i would do some research on the web regarding garbage disposal, and the proper techniques of doing so. maybe you're missing something?
-Matt