Kharlos Dominguez
Kharlos Dominguez

Reputation: 2277

ASP.Net application getting slow over time

Our users of a legacy web application written in ASP.net 2.0 are experiencing slow down after using the application over some time (after 2 hours or so). For example, clicking a button performing some calculation and updating an ajax updatepanel takes several seconds while it is almost instant when they just have logged in.

If they log off and log back on of the web application, it gets back to the normal speed again, every time they do. The slow down is for a particular user and not global. It can fast for an user and slow for the user next to him.

I've looked at the IIS server and there is plenty of free memory in it and the CPU is almost always below 10%. There are only a dozen users using this web application at time so scalability shouldn't be an issue.

The only think I can think of being affected by log offs, is session state. I've already looked ViewState too and it is "only" 18kb at the slowest which shouldn't be the bottleneck, especially since they are on the same gigabit LAN and not remote. It is not any smaller when the applications runs fast. Looking at session state in the code, it isn't used much and no large objects are stored. According to my tests, it didn't grow bigger than 10 items and 500 bytes after a few minutes. Even if there was a leak, the server should be able to cope with it considering the amounts of memory it has (4GB but only using 300MB).

I've cleared temporary files and it didn't seem to make any significant difference.

Do you think these slowdowns could come from something else than Session State, keeping in mind logging off and back on gets the speed back to normal? If not, is there any tool you would suggest to profile sessionstate or a setting in IIS I should try to change?

Upvotes: 0

Views: 2224

Answers (3)

Eoin Campbell
Eoin Campbell

Reputation: 44268

If this is an AJAX heavy page & the user is staying on the same page (i.e. lots of postbacks to itself) then it's possible that it's just ViewState growing to large. and the slow down you're experiencing is due to PageSize.

I would try and recreate the experience locally & monitor the page size/traffic with something like Firebug/Fiddler. If it is a ViewState/page size issue you could look at moving ViewState to the server side

See these for more info on it.

http://professionalaspnet.com/archive/2006/12/09/Move-the-ViewState-to-Session-and-eliminate-page-bloat.aspx

Upvotes: 1

Tim
Tim

Reputation: 4101

Have you checked your database? (I assume you're consuming some data with an ajax app)

If you don't close the connection in the Finally block, you can wind up with zombie database connections that slow the app down. I don't know if this is the root cause, but probably worth looking at.

Upvotes: 1

Evert
Evert

Reputation: 8541

what does the browser's memory use look like on the client machines when they experience the slowdown? It could be memory leaks in your javascript if you are using lots of ajax stuff and the browser's memory use continuously climbs.

Upvotes: 1

Related Questions