timeout expired

Discussion in 'ASP General' started by Simon Wigzell, Jul 21, 2006.

  1. Occassionaly I get the following error, always when storing a record:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

    [Microsoft][ODBC SQL Server Driver]Timeout expired

    Googling around I see ways of setting the expiry time but why is the
    database not responding in the first place? It seems to me this has only
    started to occur with MS Server 2003, I don't recall it happening in MS
    Server 2000. It does seem to occur if the page has been idle for a while but
    I couldn't swear to that. This is not a very busy server. We are not dealing
    with a lot of records.

    I have these settings in my asp pages header:

    Server.ScriptTimeout = 50000
    session.timeout = 1000

    So it can't be my script or session timing out, the script is in seconds,
    the session minutes, I'm talking about less than an hour that the page has
    been idle.

    thanks for any help.
    Simon Wigzell, Jul 21, 2006
    #1
    1. Advertising

  2. Simon Wigzell wrote:
    > Occassionaly I get the following error, always when storing a record:
    >
    > Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
    >
    > [Microsoft][ODBC SQL Server Driver]Timeout expired


    Nothing to do with your problem, but why are you using ODBC?
    http://www.aspfaq.com/show.asp?id=2126
    >
    > Googling around I see ways of setting the expiry time but why is the
    > database not responding in the first place?


    Hard to say without knowing what you are trying to execute.

    > It seems to me this has
    > only started to occur with MS Server 2003, I don't recall it
    > happening in MS Server 2000. It does seem to occur if the page has
    > been idle for a while but I couldn't swear to that. This is not a
    > very busy server. We are not dealing with a lot of records.
    >
    > I have these settings in my asp pages header:
    >
    > Server.ScriptTimeout = 50000
    > session.timeout = 1000


    These are totally irrelevant. Look at your error message. See where it's
    coming from? Is it saying anything at all about a script timeout or a
    session expiring? ;-)

    This is an ADO timeout. Specifically a CommandTimeout. The ADO Connection
    object has a CommandTimeout property. If you are using a Command object, it
    also has that property.

    This should help explain things:
    http://www.aspfaq.com/show.asp?id=2066



    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jul 21, 2006
    #2
    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.

Share This Page