0

I have a website on localhost and I am making a request to SQL Server 15 which is also located on my machine. I am not sure why but the request is getting timed-out while Visual Studio 2019 is running. Please see below: enter image description here

Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

When I close VS and send the request again, the request gets processed successfully as shown below: enter image description here

I have tried to use Visual Studio Code, but the same issue occurs, i.e only when I close Visual Studio Code the request returns successfully. I have also increased the commandTimeout but that is of no help. There are also no open transactions in the database. I am unable to debug my application in VS. Please help, thank you.

1fuyouinfinite
  • 1
  • 1
  • 1
  • 14
  • Maybe you can optimize your codes that connects with database. While running VS in debug mode it is less performant so it may take more time to execute application and timeout occurs i think. – mustafa Oct 05 '22 at 12:47
  • This type of timeout can have three causes; 1.There's a deadlock somewhere, 2.The database's statistics and/or query plan cache are incorrect, 3.The query is too complex and needs to be tuned. Maybe you can look at this thread: https://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation – YurongDai Oct 13 '22 at 07:15
  • I have this exact same problem. Sometimes there is no problem. Sometimes a restart of Visual Studio helps. Sometimes a reboot of PC helps. I never have the problem when the application is published and installed on the PC. This problem really slows down development. It happens with only one of my many applications. – Ken Smith May 29 '23 at 21:52

1 Answers1

0

Can you try to set commandTimeout to 0. It means no limit.

mustafa
  • 400
  • 1
  • 9