Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have hosted ASP.Net application on IIS server , its always throws SQL time out error, web app time out exception error, takes lots of time for initial load even landing page is simple html content asp page. Tried almost all solutions found on net, but of no use.

Also this behavior has been observed at the time of SQL hangs always.
Please suggest any tips or tricks for the same.


What I have tried:

1. Wrote events in SQL Server to find time out queries list, but found that listed all
queries are simple one liner SQL queries. They are not complicated queries.
2. Improved SQL queries re written it with needed fields instead of using *.
3. Ensured proper closing of sql connection.
4. Set Command time out to zero in code.
5. Reduced size of images used in application.
6. Implemented View State - its improved speed of site loading very quickly, but
problems of hang still persist.

7. Loading .js files at last
8. Removing unnecessary/not required css, js files.
9. Rewritten hanging part of css in inline.
10. Tried posted solution on codeproject, https://www.leansentry.com/", stackiyfy.com


Doing end task for IIS process consuming 100 memory temprarory solves the issue.
Posted
Updated 4-Sep-21 21:46pm

1 solution

If it's the SQL Server queries causing the delay, the key for slow queries is not the complexity. A very simple query can take a lot of time. Two main things to investigate
- Do the queries fetch unnecessary data. You went through the columns but how about the rows?
- Is proper indexing in place. Look ate the WHERE clauses of the problematic statements do you have indexes that provide quick access path to the rows, taken that your only fetching a small portion of the table
- Use Tuning advisor to see what recommendations the database has, see Start and Use the Database Engine Tuning Advisor - SQL Server | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900