Is it necessary to have timeout value set for the connection string?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Is it necessary to have timeout value set for the connection string?

    Hello,

    I am new to ASP application. I have a asp-based web
    application that uses SQL Server as the backend. I open
    connections to the database on every page. I also have one
    custom component that is used for user authentication.
    This custom component also connects to the database.

    Now, in my code I have set oCon.ConnectionTimeout = 0.

    I would like to know whether this is good or not.
    The problem is that if the database server is down, the
    asp pages are not able to connect for obvious reasons. If
    the requests come in for sometime, then after sometime we
    are unable to access asp pages.

    I have a suspicion that the timeout thing has something to
    do with it.

    Any help would be appreciated.

    With regards,
    Manik
    Manik Roy Guest

  2. Similar Questions and Discussions

    1. connection timeout
      One of my contribute sites seems to timeout after about two minutes when users are editing pages. There's no error message and it reconnects...
    2. MySQL connection timeout
      Hi NG I'm Currently experiencing some problems with my database. When I try to connect to it, it returns this:
    3. Handeling connection timeout
      as we know each application in asp.net has a default read only conncetion timeout how could i handle this conncetion timeout so that whenever the...
    4. Connection timeout to sybase DB
      Hi, Have just migrated a web app from an iis4 server to iis5. Everything works perfectly except that when executing one particular query the odbc...
    5. Timeout expired in connection
      Hi, I have problems using COM+ object. In the object I run stored procedure using command object to get statistics information from database. The...
  3. #2

    Default Re: Is it necessary to have timeout value set for the connection string?

    I'd set the timeout to 10 seconds.

    Also, if the server is down, the conn.open line will generate an error after
    the connectionTimeout has passed, and you can trap this with on error resume
    next or a custom error page.

    Though, I'd probably spend more time worrying about keeping your database up
    and running, rather than just dealing with it when it's down.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "Manik Roy" <mroy@duplexinfotech.com> wrote in message
    news:001801c3d6e0$d9bfa620$a601280a@phx.gbl...
    > Hello,
    >
    > I am new to ASP application. I have a asp-based web
    > application that uses SQL Server as the backend. I open
    > connections to the database on every page. I also have one
    > custom component that is used for user authentication.
    > This custom component also connects to the database.
    >
    > Now, in my code I have set oCon.ConnectionTimeout = 0.
    >
    > I would like to know whether this is good or not.
    > The problem is that if the database server is down, the
    > asp pages are not able to connect for obvious reasons. If
    > the requests come in for sometime, then after sometime we
    > are unable to access asp pages.
    >
    > I have a suspicion that the timeout thing has something to
    > do with it.
    >
    > Any help would be appreciated.
    >
    > With regards,
    > Manik

    Aaron Bertrand - MVP Guest

  4. #3

    Default Re: Is it necessary to have timeout value set for the connection string?


    Thanks for the quick reply.

    But is specifying the timeout useful during the execution of queries
    also.
    And, should in this case the timeout value depend upon the load on the
    web server also?

    With Regards,
    Manik

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Manik Roy Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139