Closing out database connections. Timeouts

Discussion in 'ASP .Net' started by Do, Dec 9, 2003.

  1. Do

    Do Guest

    Hi,

    Is it better to

    objConn = Nothing
    or
    objConn.Close.

    I'm starting to get an error message that

    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.
    What am I doing wrong?

    Thanks,

    Do
    Do, Dec 9, 2003
    #1
    1. Advertising

  2. Do wrote:
    > Hi,
    >
    > Is it better to
    >
    > objConn = Nothing
    > or
    > objConn.Close.


    objConn.Close(). Database connections do not close themseleves upon
    going out scope.

    > What am I doing wrong?


    There are other issues to consider such as network latency and server
    load. But start by closing all your connections as soon as you're done
    with them and take it from there.

    --
    There are 10 kinds of people. Those who understand binary and those who
    don't.

    http://code.acadx.com
    (Pull the pin to reply)
    Frank Oquendo, Dec 9, 2003
    #2
    1. Advertising

  3. Hi,
    Timeout Problem arises if you have any query which
    consumes more resources and more time in execution. Just
    cross check with the Query which you are using in SQL
    QUERY Analyzer.

    For the Command Object there is a property called TimeOut
    which u can set an integer value for query execution time
    period.

    Thanks
    srinivas moorthy
    >-----Original Message-----
    >Hi,
    >
    > Is it better to
    >
    >objConn = Nothing
    >or
    >objConn.Close.
    >
    >I'm starting to get an error message that
    >
    >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.
    >What am I doing wrong?
    >
    >Thanks,
    >
    >Do
    >
    >
    >
    >.
    >
    srinivas moorthy, Dec 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmFzb24=?=

    forms authentication timeouts and session timeouts

    =?Utf-8?B?SmFzb24=?=, Jun 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    447
    =?Utf-8?B?SmFzb24=?=
    Jun 22, 2004
  2. Patrice
    Replies:
    3
    Views:
    7,122
    Michael D. Long
    Sep 22, 2004
  3. dustin lee

    closing database connections

    dustin lee, Jan 23, 2004, in forum: Python
    Replies:
    4
    Views:
    364
    Frank Bechmann
    Jan 24, 2004
  4. Dave V
    Replies:
    0
    Views:
    437
    Dave V
    Jun 13, 2007
  5. jobs
    Replies:
    2
    Views:
    886
Loading...

Share This Page