locked
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding" RRS feed

  • Question

  • Hi ,

    Dear ,i run delete commands to delete some rows in transactions.This query run successfully.But after that when i run my application the it gives that timeout expired error which i mentioned in subject.I am using dataset  and dataadapters to get data from MSSQL server 2005 database.

    Please help someone who know that problem.I will be thankful to you on your knidness.

    Best Regards,

    Umair Saeed.


    • Edited by Mike Walsh FIN Monday, March 21, 2011 9:57 AM Quotes put around error message in Title. This not a workflow question so I am moving it to the admin forum. (I do not understand why a question about delete commands went to the Workflow forum)
    • Moved by Mike Walsh FIN Monday, March 21, 2011 9:57 AM admin q (From:SharePoint - Workflow (pre-SharePoint 2010))
    Monday, March 21, 2011 9:15 AM

Answers

  • Hi,

     

    Could you please give me more information of error logged in log file? According to your description, there are two types of timeout exception that could be raised by SqlClient objects: SqlConnection and SqlCommand.

    SqlConnection timeout exception is raised when app is trying to establish connection but not successful within the given time period, which, in your case, is 500 (more than 8min! You do not need that long time to be convinced there is connection problem!).

    SqlCommand's Timeout decides how long time a command is given for the application that uses the SQlCommand to wait for SQL Server to finish the operation invoced by the SqlCommand. It seems the SqlCommand in your application starts a lengthy data processing in SqlServer, so you should set longer timeout to the SqlCommand object (30 is default), not SqlConnection object. However, 500 seems too much. if the process needs that much time to run, you'd better rethink your app logic, for example, break data into smaller chunks, then process it one by one.

     

    Best Regards
    David Hu

     

    • Marked as answer by Emir Liu Tuesday, March 29, 2011 1:14 AM
    Wednesday, March 23, 2011 1:17 AM

All replies

  • Hi Umair,

    Please refer 

    http://social.msdn.microsoft.com/Forums/en/vblanguage/thread/57dc992f-fcc4-4b17-8187-a9002c4bc28c and under it please find how to adjust timed out period.

    Also refer 

    http://social.technet.microsoft.com/Forums/en-US/operationsmanagerreporting/thread/32c711c8-85a4-4320-a0d1-63f8ea409944

    hth


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
    Monday, March 21, 2011 11:22 AM
  • Hi,

     

    Could you please give me more information of error logged in log file? According to your description, there are two types of timeout exception that could be raised by SqlClient objects: SqlConnection and SqlCommand.

    SqlConnection timeout exception is raised when app is trying to establish connection but not successful within the given time period, which, in your case, is 500 (more than 8min! You do not need that long time to be convinced there is connection problem!).

    SqlCommand's Timeout decides how long time a command is given for the application that uses the SQlCommand to wait for SQL Server to finish the operation invoced by the SqlCommand. It seems the SqlCommand in your application starts a lengthy data processing in SqlServer, so you should set longer timeout to the SqlCommand object (30 is default), not SqlConnection object. However, 500 seems too much. if the process needs that much time to run, you'd better rethink your app logic, for example, break data into smaller chunks, then process it one by one.

     

    Best Regards
    David Hu

     

    • Marked as answer by Emir Liu Tuesday, March 29, 2011 1:14 AM
    Wednesday, March 23, 2011 1:17 AM