Click here to Skip to main content
11,580,000 members (68,221 online)
Click here to Skip to main content

Why is my web application slow?

, 19 Jul 2012 CPOL 18.1K 17
Rate this:
Please Sign up or sign in to vote.
My perspective on “where to begin” to address this issue in a general sense for a Microsoft centric web application.

Web application slowness in different environments in a software factory-line is something that we all must have come-across at some point or the other. Here is my perspective on “where to begin” to address this issue in a general sense for a Microsoft centric web application. Let as assume that our application was developed using ASP.NET and a SQL Server database.

Web Server

1. Go though the Event Viewer log for any errors, warnings and informational messages. Watch out for messages that were logged by your application and another other applications on your web server.

2. Check the IIS logs to see if there is any unusual response rate i.e. errors (http 500, 404, etc).

3. The application pool in IIS can be a source of the slowness of the application.

4. The web server could have ran out of disk space (lack of error log rolling and backup service).

5. IIS crash because of a memory leak, thread locking, etc.

6. JavaScript interaction with UI objects (Flash, Applets, Silverlight).

7. Make sure that the web server is up-to-date with all the latest “software patches” ;) (oops !!!  service packs)

8. Make sure that the database connection pool settings are correct.

9. Consider rendering the website content using a content delivery network (CDN) service provider like Akamai, Amazon CloudFront, Microsoft Azure, AT&T, etc.

10. If none of the above seems to cause an issue then read-on.

Application Code

1. Analyzing the web request and the web response across multiple pages of the application using tools like Charles, Fiddler, Firebug, etc can provide you lot of information that you would not know otherwise.

2. Narrow down the scope of the slowness in the page execution.

3. Not disposing objects after use can eat up lot of resources on the web server causing the slowness.

4. Make sure that the response times of all the Ajax, web service calls  are in line with the expectations.

5. Run extended load tests to determine if there might be a new cause of failure, that might not have been noticed during regular load tests.

6. Always employ best practices for implementing web site acceleration [1].

7. Consider fetching multiple result sets in one database call as opposed to one result set per database call. This will reduce the number of round trips to the database.

8. If none of the above seems to cause an issue then read-on.


1. Low disk space on the SQL Server/Cluster.

2. Not following SQL Server best practices.

3. Go though the execution plans of the various suspect SQL scripts/statements to isolate the issue. Table scan can be a very costly operation as opposed to a index scan.

4. Run a SQL Trace for a few hours in an environment with lot of traffic and feed the trace file to the SQL Server Performance Tuning wizard.

5. Apply the recommendations of the SQL Server Performance Tuning wizard to the database to see if that helps.

6. Verify and make sure that the background SQL, SSIS and SSRS tasks are scheduled to run during off-peak hours.

7. Considering breaking down a huge database into smaller ones. as an example an e-commerce website should be accessing data from a Catalog, Marketing, Sales and Audit databases instead of one big database.

8. Consider regular archiving and cleanup of historical data from all databases.

9. Index defragmenting [2] can improve the SQL execution times too.

10. Sorting of huge record sets might be best left to he done at the application level than at the database level. This could be controversial depending on who you speak to. With this kind of a solution chances are that a modern day beefed-up web server in a web farm (load balanced environment) should be able to handle expensive data operations. This would conserve SQL Server processing time to handle more requests.

11. I hope your issue might have been resolved by now.

Good luck and happy programing ! 

1. Cost-effective website acceleration
2. Microsoft SQL Server 2000 Index Defragmentation Best Practices 


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


About the Author

Sudheer Reddy Battula
United States United States
Sudheer Reddy Battula - Caveman's Blog

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
Mahesh Babu Kudikala8hrs 17mins ago
memberMahesh Babu Kudikala8hrs 17mins ago 
SuggestionMy vote of 4 Pin
John B Oliver9-Aug-12 12:54
memberJohn B Oliver9-Aug-12 12:54 
this is a great article for people starting out in web service land. The steps you have taken here are very much in line with what one would expect to have to perform, so well done.

The ONLY reason for a 4 and not a 5 is the lack of a few pointers for beginners on how to perform some of the checks and maybe some links to the tools.

IIS Logs:
If the default settings are used, then the log files should be in the directory %SystemDrive%\inetpub\logs\LogFiles. In order to check (in IIS 7 or Server 2008) go to the Logging feature for the Default Web Site using the Internet Information Services (IIS) Manager snap-in (Start -> Run -> inetmgr).

Disk Space issues on Sql Server:
Lack of disk space on the Sql server can be caused by incorrect settings for log files, transaction states etc.
I have found RidNacs[^] to be a great tool for finding those directories containing very large amounts of used disk space.

One other suggestion I can make for Sql Server is if you have a dedicated Sql Server, then analysing the Plan Cache Statistics can be of great help. See Vipul Shah's Sql Blog[^], Robert Pearl's article Always have a Good Plan![^] and the eBook Troubleshooting Sql Server[^] for more details.

- John
GeneralMy vote of 4 Pin
Christian Amado1-Aug-12 5:52
memberChristian Amado1-Aug-12 5:52 
GeneralWhy is your web application slow? Pin
ii_noname_ii19-Jul-12 1:48
memberii_noname_ii19-Jul-12 1:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150603.1 | Last Updated 19 Jul 2012
Article Copyright 2012 by Sudheer Reddy Battula
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid