Timeout Expired Error

  • Hi guys,

    I am frequently getting the Timeout expired error while connecting my .net application from sqlserver2005

    Can any one help me out to resolve the issues.

    Thanks in advance,

    Ram

  • Either 1) your ADO.NET connection timeout is too low, or 2) your program cannot find (or access) the SQL server that you are trying to connect to.

    The answer to (1) is to raise the connection timeout value in your ADO.net connection.

    As for (2), check you address's and access rights.

    We would need to see the code to go any further than this.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Probably not access rights if you can connect some of the time.

    Maybe the query is taking too long to execute? Or network congestion?

    You can look at the current activity on your SQL server to see if the connection is there exactly what it's doing.

    Another idea is to do a tracert or ping from the machine that's connecting to the db server and look at the times to see if they are reasonable

  • The simplest thing to do is to start profiler and find out what's going on at the SQL server. And search this site, there are similar posts that address this issue. Be sure to post the final resolution so that others can benefit from what you've learned.

    Good Luck


    Doug

  • Mark Horninger (3/21/2008)


    Probably not access rights if you can connect some of the time.

    Good point, I missed the "frequently" in the OP.

    In that case, it is almost certainly that your attempts to connect are exceeding their connection_timeouts. Quick fix: raise the connection timeout. Long-term fix, figure out why and address it (see above).

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply