SQL Server Why I am getting Timeout Error in my live site

vptzau2j  于 2023-10-15  发布在  其他
关注(0)|答案(3)|浏览(107)

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:

  1. Increased the SqlCommand Timeout = 0 and 240
  2. Increased the SqlCommand Connection Timeout = 0
  3. 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

kt06eoxx

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.

ssgvzors

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.

uplii1fm

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.

相关问题