Solved

ASPX causes high IIS CPU

Posted on 2009-04-06
6
503 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

726 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