?
Solved

ASPX causes high IIS CPU

Posted on 2009-04-06
6
Medium Priority
?
504 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 21

Accepted Solution

by:
MogalManic earned 1600 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 400 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

765 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