hi I'm getting an error Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
.
I'm alredy changed the connect timeout = 60000
and in database my procedure is executes in 43sec. so plz give me some perfect solution
thank you
Increase the query timeout. Connection timeout is only on the connection time. Presuming you are using SqlCommand, there is a timeout property in there.
You should note that
Timeout
property forSqlConnection
object andTimeout
property forSqlCommand
object are different properties.By default command timeout is set to 30 seconds. Set it to 60, and your issue will be solved:
But most likely that you should change your SQL procedure or split it to some parts
Try running your SQL query using Microsoft SQL Server Management Studio, and click the "Estimated Execution Plan" button. This will tell you if you have any indexes missing. Adding the missing indexes should speed up your query.