Results 1 to 11 of 11

Thread: Timeout expired

  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: Timeout expired

    I wrote a stored procedure...and executed in Query Analyser.
    It took 40min to execute....ofcourse...it is something like archieving database of millions of rows along with distributed queries....I am quite ok with the stored procedure.....(even time taking)...

    But, then I executed the same stored procedure in my program using the command object which within less than a min...I am returned with the following error:

    TIMEOUT EXPIRED. THE TIMEOUT PERIOD ELAPSED PRIOR TO COMPLETION OF THE OPERATION OR THE SERVER IS NOT RESPONDING.

    I think the connection could not sustain till the completion of store procedure.

    Can any one help me how to execute through UI.

  2. #2
    Join Date
    Jan 2004
    Posts
    10
    try test your connection first by using ADO control...

  3. #3
    Join Date
    Jan 2004
    Posts
    7
    I am using VB.NET to work out......even the connectiontimeout or commandtimeout seems to be not working..

  4. #4
    Join Date
    Jan 2004
    Posts
    10
    may i know your Stored Proc?

  5. #5
    Join Date
    Jan 2004
    Posts
    7
    create procedure xxx as
    begin
    begin transaction
    insert ..... select * from linkedserver.database.user.table1
    insert ..... select * from linkedserver.database.user.table2
    insert ..... select * from linkedserver.database.user.table3
    insert ..... select * from linkedserver.database.user.table4
    .
    .
    .
    .
    commit transaction
    end

  6. #6
    Join Date
    Jan 2004
    Posts
    10
    I think u are trying to insert from a database tables to another database tables. Have you tried executing a simple stored proc to your UI? if still time out expired then the problem is in your UI. if not, it is your database tables that have problem.

  7. #7
    Join Date
    Jan 2004
    Location
    Shanghai,China
    Posts
    76
    I think the cause is that the execution time of the big transaction is too long.when the connection's timeout threshold is up,the transaction is still executing.So setting the connection's timeout longer or no limitted.

  8. #8
    Join Date
    Jan 2004
    Posts
    7
    but the connectionTimeout property in dotnet is related to "time to try to connect to db before giving back error"....right?....then how can I solve the problem..

  9. #9
    Join Date
    Jan 2004
    Location
    Shanghai,China
    Posts
    76
    According to odbc.net document,the odbcconnection's connectiontimeout property is setting waiting-time of connection's open.
    And I think the problem is the execution time is too long.So I think the best solution is using asynchronization mode.
    U must return the control to your client,and in back-end check the execution status if finished.

  10. #10
    Join Date
    Jan 2004
    Posts
    7
    how to do it asynchronously....any help or doc is requested

  11. #11
    Join Date
    Jan 2004
    Location
    Shanghai,China
    Posts
    76
    Sorry ,I'm not falimiar with dotnet.But I found on document,u can set command.commandtimeout=0,it means not limit to wait time.
    And I think in dotnet asynchronization can realize via multi threads.

Posting Permissions

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