Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

后端 未结 20 2201
臣服心动
臣服心动 2020-11-22 10:23

I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2).
I\'ve

相关标签:
20条回答
  • 2020-11-22 11:03

    I faced same problem worked on it around 3 days. I noticed as our number of records are not much our senior developer keeps 2 images and Fingerprint in database. When I try to fetch this hex values it taking long time, I calculate average time to execute my procedure its around 38 seconds. The default commandtimeout is 30 seconds so its less than average time required to run my stored procedure. I set my commandtimeout like below

    cmd.CommandTimeout = 50
    

    and its working fine but sometimes if your query takes more than 50 seconds it will prompt same error.

    0 讨论(0)
  • try

    EXEC SP_CONFIGURE 'remote query timeout', 1800
    reconfigure
    EXEC sp_configure
    
    EXEC SP_CONFIGURE 'show advanced options', 1
    reconfigure
    EXEC sp_configure
    
    EXEC SP_CONFIGURE 'remote query timeout', 1800
    reconfigure
    EXEC sp_configure
    

    then rebuild your index

    0 讨论(0)
提交回复
热议问题