How to automatically kill the processes with 'sleeping' status on sql server?

Posted on 2007-07-26
Last Modified: 2012-05-05

I have purchased a .net application using sql server2000. The application was running fine on my local machine until I put it on the web server. I started to get error 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"

Given that the error may have been related to 'connection leak', I checked the processes on the SQL server and noticed there are many processes created and they were all in sleeping status.
On the web server some of these proceses were dated to 2-3 days ago.
however on my local machine, same number of proceses are created but SQL server automatically kills theses processes in about 10 minutes interval. I noticed that on SQL profiler when 'Audit logout' executed.
this is not happening on the web server.
looking at the properties of the two sql server and security tab, the audit level is set to none fro both.
How can I fix the SQL server set up on the server so that I get these proceses cleaned up quickly?

Thanks in advance

Question by:shmz
    1 Comment
    LVL 15

    Accepted Solution

    I think the first thing you need to do is make sure that your application is properly closing all connections it uses after they are finished.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now