IIS 5 & IIS 6
View status of currently/recently loading pages under IIS 5.1
Last post Mar 04, 2013 10:34 AM by Ken Schaefer
Feb 14, 2013 11:34 PM|LINK
I'm investigating performance issues with IIS 5.1- certain pages on our primarily ASP-based system are take ages to load, though not consistently, and the server seems to slow to a near-halt. My question is, how can I see which pages are causing the problems
and currently being served, and what the general status of the server and served pages are.
I know that I can check the logs, but they don't seem to be updated immediately, and not until after the pages have loaded (or not).
Basically... IIS 5.1 seems to include very little in the way of tools like this. I know that some of the later versions of IIS include a similar facility, but it's not possible for us to upgrade at present.
I apologise if this question has been answered before- I expected that it might have been, but I can't find any satisfactory answers out there. :-( Would appreciate any help received, thank you!
Feb 14, 2013 11:52 PM|LINK
You mention you are running IIS 5.1 - that's the IIS that ships on Windows XP. It does have a 10 concurrent HTTP connection limit - other requests would be queued behind whatever is being processed at the time. So, if you have many users, this could be the
Otherwise, you can run Performance Monitor (perfmon). Whilst this won't tell you what pages are being served in real-time, you'd at least be able to check to see if you have any resource bottlenecks (CPU, Disk I/O) that might be bottlenecking your application.
You can cross-reference the times when you are have resource usage issues with the time stamps in the IIS logfiles.
If it turns out that you do not have any physical resource issues, and it's not a concurrent user issue, then it would seem like it's an application issue (e.g. ineffecient ASP code). That's going to be a bit harder to track down on IIS 5.1. It might help
if you can get your users to tell you which pages they are having problems with, and you could write some instrumentation into those pages.
Feb 15, 2013 06:47 PM|LINK
Yes, I've had a look at perfmon; I might look at that again. Problem is it only deals in generalities. :-(
I strongly suspect that this *is* something to do with ASP, as the problem seems to have got worse as the system has grown in complexity. (Unfortunately, it's mainly old-school ("Classic") script-based ASP playing outside its league and needs rewritten from
scratch, but that's another story.)
The problem seems to slow *all* pages being loaded at a given time when there's a problem with the system. On the other hand, it's hard to judge, because I can't see which specific pages and files are being loaded(!)
I wrote some Perl scripts to analyse the log files, as well as some to take the output of netstat and show connections to the web server which are currently active. It seems that when there's a problem, there are sometimes far fewer than 10 simultaneous
connections (though in theory I got round that limitation anyway).
What would be really nice would be if I could tie the currently-active web connection info (IP address and port for both ends) with the name of the page it was currently being used for. Unfortunately, it seems that the logs are only written *after* the page
has finished loading, or failed completely.
Thanks for the feedback all the same, and I'll definitely take some of your suggestions on board as new ideas to approach this with.
Feb 16, 2013 01:02 PM|LINK
Windows XP is a desktop OS and shouldn't be used for a web server. If you aree hacking around to get over the desktop limit of 10 connections then this is not supported either.
You should have use a server OS for serving pages.
All IIS logs are written after the page has been served, there is no way to get the current info before as IIS know what to do with it.
But you don't need this to discover problem pages just look at the IIS logs for long running pages, etc. It is likley a code issue.
Feb 16, 2013 06:03 PM|LINK
Yes, I'm aware that XP isn't a server OS and the workaround for the 10-connection limit is a hack. The setup is quite old now, and wasn't created by me in the first place.
It also consists of a bunch of "Classic" ASP scripts (i.e. now-obsolete 90s system pushed further than it was ever designed for) and Access/JET (via OLE DB). In other words, the whole thing is based on dated technology and the best thing would be to redo
it from scratch. But none of this is practical at present (upgrading the server in the near-future, possibly, the rest not so much).
As for checking slow-loading pages; yes, that had occurred to me, and is probably what I'll look into, but bear in mind that *all* page accesses run slow when this happens, and that obviously some pages take longer to load than others normally anyway.
Also, it's not consistent like it was with (e.g.) a page using badly-written SQL, which slowed things so badly it had to run in the middle of the night and I later rewrote (*). That had a clear cause. In this case, things are just *occasionally* horribly
slow, and as this is a till system for a shop, it's understandably annoying for the people who work there.
I suspect that there are some resources not being correctly disposed of and/or reallocated, but this is veering into ASP territory.
To be honest, I'd just wondered if there were some common tools that'd make diagnosing this sort of thing easier. If not, then I'll have to accept that, but it was definitely worth asking just in case. :-)
(*) Went from taking hours to taking something like 30 seconds. That was my lousy SQL in the first place, so I can't blame my predecessor for it :-O
Mar 04, 2013 10:34 AM|LINK
a) instrument your web pages so that they write some detailed logging information to a text file
b) since you are using Access, you absolutely need to ensure that your DB access is optimised (you'll be running into blocking issues with multiple threads accessing the DB):
My preferred coding method for ASP pages that need to deal with Access databases is to:
a) validate user input
b) setup all necessary SQL strings
c) open connection (i.e. as late as possible)
d) populate a recordset -> use .GetArray() to move recordset to array immediately
e) repeat (d) for each recordset
f) Set recordset = nothing, and do the same for the connection object
g) do any post-processing
h) start displaying HTML