I am facing a problem with my live site. The Issue is a SQLTimeout error.
I have followed the below scenario to solve the issue. But I can't do it .
Steps taken:
- Increased the
SqlCommand
Timeout = 0 and 240 - Increased the
SqlCommand
Connection Timeout = 0 - I have applied raw SQL in code to fetch the data from SQL Server
Kindly share with me if you have any suggestions about this issue.
Thanks
3条答案
按热度按时间kt06eoxx1#
It is really hard to address your issue with so little info you provided.
Generally I would recommend to execute your query in SQL Server Management Studio and see what happens.
It could be either really long query or locking issue in database. Also be aware, if you host you site on IIS, that apart from SQL Server timeout, the IIS request timeout would apply.
ssgvzors2#
Example :
Table 1, Table 2 , Table 3
Issue Scenario: You have request to get those three table values .But the second request used to store some value in any one table at the same time existing request is not completed .
you will get the timeout error here , because existing request is not completed ,
Solutions : Please use isolation concept to avoid this error while writing and read and updated time
Thanks.
uplii1fm3#
In this kind of issues will give on the below scenarios
1.Multiple request occurred on the same table like Searching. Updating, searching Deleting (In the sql server) 2.Searching and fetched the bulk data without using with(nolock) in that query.