Re: Too Many Processes?

From: Aaron Weiker (aaron_at_sqlprogrammer.org)
Date: 02/09/05


Date: Tue, 08 Feb 2005 21:33:18 -0500

Jeff Haumesser wrote:
> I have a VB .NET Application accessing a SQL Server 2000. This application
> uses stored procedures extensively to access the data. My question concerns
> the processes on the server. I've been observing 15 - 30 sleeping processes
> running just after starting my application. Many of these are due to my
> stored procedures. Should I be seeing this just from opening my
> application? I've been closing my connections after executing any data
> access code, as well as closing my objects. Any suggestions or comments
> would be appreciated regarding this.

As long as you are correctly closing AND disposing of your objects when
you are done with them you will be fine. The default nature of
connection pooling will keep the connections open for a while until they
haven't been used for a while and then close the connection.

If you are just closing the objects when you are done with them you
"should" be ok, but it is usually a best practice to always Dispose when
an object implements IDisposable.

-- 
Aaron Weiker
http://aaronweiker.com/
http://www.sqlprogrammer.org/


Relevant Pages

  • Re: Time out errors
    ... I am opening, closing, disposing, ... because of existing open connections that were never disposed. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Threading and a database connections.
    ... Are you closing your connections in the Finally block? ... If you are disposing some objects in the Finally block, ... Update commands would always apply a lock on the table, however, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to gracefully (programmatically) kill an app?
    ... | closing the console window. ... want the server application to stop accepting connections. ... that server file maintenance can be done with the first event and a full ... In dictatorships, you need courage to fight evil; ...
    (microsoft.public.vc.mfc)
  • rblsmtpd/qmail-smtpd hung processes
    ... After a while the server just quits accepting smtp connections, or will connect/disconnect very quickly. ... Since I'm not seeing any log activity that shows what's going on, I'm having a hard time figuring it out. ... Our email/dns provider is closing up shop in about a week. ... I only had about 3 weeks notice on this and I've been configuring a pair of FreeBSD machines to take over DNS and E-Mail for about a dozen sites. ...
    (freebsd-questions)
  • RE: JDBC connections not closing
    ... | Thread-Topic: JDBC connections not closing ... | thread-index: AcTB1nv3W8xh6wDJQIK0wY6q4fuFig== ...
    (microsoft.public.sqlserver.jdbcdriver)

Loading