Solved

ASPX causes high IIS CPU

Posted on 2009-04-06
6
498 Views
Last Modified: 2012-05-06
Hello,

I'm a network/systems guy so I appologize in advance if I left something out.  Here's some attachements for code from a custom web page that we use internally.  This section is for medical records.  There is a page that you click a find button, that passes the ID=Central to records.aspx which is tagged to use the centralworklist.ascx with the central id.  Every time it is called it will cause high cpu on the IIS server.  There are quite a few users of this app so it brings down the speed for everyone else to a crawl.  It is IIS 6 on the front and ms sql 2008 for the back.  

Is there anything that pops out to anyone that could cause this and what we can do to fix?

Thanks alot for the help, just let me know if I left anything important out (I'm sure I did :)
Records.aspx.txt
Records.aspx.cs.txt
Records.aspx.resx.txt
CentralWorklist.ascx.txt
0
Comment
Question by:FHCSD_IT
  • 2
  • 2
  • 2
6 Comments
 
LVL 21

Expert Comment

by:MogalManic
ID: 24087741
CentralWorkList.ascx contains a gridview.

My guess is that the code that populates the gridview is in the CentralWorkList.ascx.cs.  This is where the bottleneck probably is.  Can you send that code?  If not, look in that CS file for code is executed inside loops (for, foreach, while,...).

All of the code you sent does not show anything that would be slower than any other pages.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24087814
you said that when you click on find the CPU usage increases
first question is the IIS server also hosting the database server
second when you run the query or stored procedure how much time does it take to bring the result set back
third how many results are being returned - number or rows returned
0
 
LVL 1

Author Comment

by:FHCSD_IT
ID: 24088131
Sorry about that, I'm including the CentralWorklist.ascx.cs, and the stored procedure that is called from this.

The Sql is hosted on a separate server, looks like it is getting the top 2000 records in the sp.

I ran the sp directly on the sql server and it completes in 1 -2 seconds with no cpu problems, if run through IIS it takes 20 - 40 seconds and has the high cpu the whole time.

Thanks alot for the help, it's appreciated.
CentralWorklist.ascx.cs.txt
usp-GetWorkListValues.sql.txt
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 21

Accepted Solution

by:
MogalManic earned 400 total points
ID: 24090084
The only thing I see is that the call of CreateJavaScriptArrayForPrintingRoutingSlips() creates a Javascript array of all 2000 rows.  Which might create extra processing and increase the size of the HTML being downloaded.

You could enhance the function to only generate the routing scripts for the current page being displayed.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 100 total points
ID: 24093881
shoudnt it be better if you create the routing slip only when its required to be printed instead of creating it always
it wil save a lot of processing as you are not going to print the slip always
0
 
LVL 1

Author Closing Comment

by:FHCSD_IT
ID: 31567308
Thanks alot for the help
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now