Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASPX causes high IIS CPU

Posted on 2009-04-06
6
Medium Priority
?
505 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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