Showing posts with label pools. Show all posts
Showing posts with label pools. Show all posts

Sunday, March 25, 2012

Connection pools constantly grow

I've got a little console app that basically pulls back a recordset from our SQL Server 2005, goes through each row in the dataset and may/may not insert a record into a different table in the database. We use sproc's for every transaction and I close every connection in the application. However, when the application ends, I still show connection pools open in the performance monitor. Same with websites that I know have no traffic or that have been stopped by me in IIS.

Last night I showed a total of 6000+ "Current # pooled and nonpooled connections". Should I be worried about what seems to be unending growth in the connection pools? If so, how can I look to manage this better?

Check the following article:

http://www.15seconds.com/Issue/040830.htm

Regards

|||

I actually read that article yesterday.

Perhaps I'm dealing with a connection leak. If so, I don't know how. All my transactions are either handled via:

Try SqlConnection.Open() SqlCommand.ExecuteNonQuery()Finally SqlConnection.Close()End Try

Or

Try SqlDataAdapter.Fill(DataSet,"Results")
Finally
If SqlConnection.State = ConnectionState.OpenThen SqlConnection.Close()End If
End Try

My program uses two databases, which means that there are two connections strings. That accounts for the reason the program creates 2 connection pools when it runs, but why aren't those pools closed when the program finishes? Next time the program runs, it's increased by 2 again.

sqlsql

Connection Pools and Restoring a DB

Hi all...

Is there any way to flush the connection pool through code?

I am trying to restore a DB from within Code and keep running into the fact that the restore cannot exclusively lock the DB.
I believe this is because there are some connections from the application that are pooled.
The app that I am working on accesses the DB to start up, so connections are maintained in the pool to the DB. Then from within the same application I want to suspend all users.. which I can do.. then restore a backup of the DB over the existing DB.
However even though there is no activity.. the connections are not released.. and I can find no way to force them to release...
Is it possible to force release??

I am using SQL server 2000.

Any and all suggestions or ideas are welcomed..

Thanks in advance,
Simon.Have you tried keeping database in DBO-Use only and make sure those connections have any ADMIN privilege on DB.