Re: IISState log (IIS slow)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 11/29/04


Date: Mon, 29 Nov 2004 03:55:23 -0800


> AVG server load is 50-60% when IIS stops responding normally,
> asp&sql code I think is optimised, but still there is lags when it
> comes to opening asp files(even sometimes without asp code in it
> /plain html).

It doesn't matter if the file does not have any ASP code in it or not. If
you have the exact same content in two files, one named default.htm and the
other default.asp, default.htm will be served faster. This is because the
former is handled directly by the IIS Static file handler, which sends the
file as-is and as fast as possible, while the latter must be first parsed by
ASP to make sure it has NO ASP code, and then it is sent. The same applies
if you have a *-scriptmap -- because that scriptmap will be loaded to handle
the request instead of allowing the fast IIS static file handler to do the
work. In other words, configuration is important to performance.

> Two entrys I see in windows system log:
> A lot of :
> A worker process with process id of 'xxxx' serving
> application pool 'DefaultAppPool' has requested a
> recycle because the worker process reached
> its allowed processing time limit.
>
> Followed by one:
> A process serving application pool 'DefaultAppPool'
> exceeded time limits during shut down. The
> process id was 'xxxx'.
>
> System Log fills with this stuff every 5-10 seconds. I have
> configured recycle every 2 minutes in pool ,if not IIS
> totaly stops responding after some time.

You've set up the AppPool to recycle every 2 minutes. This is insane. The
two events you reported tell me that you have requests that take >
210seconds to return (based on default configuration + your stated
settings), which under any sort of appreciable load means your server is
hosed no matter WHAT you do. Your application simply chews up the available
threads being blocked on something, and recycling every 2 minutes ensures
nothing is cached and repeatedly incur any startup costs. In other words,
your server is going to be dropping connections, have high CPU, and still
not function -- mostly because your web application isn't working.

So, I suggest you focus on lowering latency for your pages so that they do
not tie up the server. IIS tweaks cannot workaround all misbehaving
applications.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Janis Buks" <JanisBuks@discussions.microsoft.com> wrote in message
news:261698D8-2FA8-4807-A6D9-5323512851B6@microsoft.com...
Thank you for your reply. I would appriciate if you could help me to solve
this big trouble.
So this problem may be in asp code?
05 031c1ad4 11ce2a1c ODBC32!SQLFreeConnect+0x18
06 0c733a1d 00000000 0x11ce2a1c
May be this is ODBC problem releasing connection??
All queries is limited to max ~10000 row return.
Here is my story(from another unanswered post here):
IIS processes pages normally without errors(only IIS Log sometimes throws
ODBC object not found exception), but
with delays(sometimes long delays).
We have 2003 server system with MSSQL2k on it and asp/asp.net applications
running. Previously we had win2k and iis 5.0 and same trouble. IIS uses only
NT4 file security when client requests file.
We have monster 2*P4 machine with 2Gb of ram, Raid..etc..
AVG server load is 50-60% when IIS stops responding normally, asp&sql code I
think is optimised, but still there is lags when it
comes to opening asp files(even sometimes without asp code in it/plain
html).
Two entrys I see in windows system log:
A lot of :
A worker process with process id of 'xxxx' serving application
pool 'DefaultAppPool' has requested a recycle because the worker process
reached its allowed processing time limit.
Followed by one:
A process serving application pool 'DefaultAppPool' exceeded time limits
during
shut down. The process id was 'xxxx'.
System Log fills with this stuff every 5-10 seconds. I have configured
recycle every 2 minutes in pool ,if not IIS totaly stops responding after
some time.
IISState shows only that what I already know, how i could point out the
problem?
I have several requests which are stuck waiting for a non-existent
thread and this is the problem so far.
Here is the asp code example that we have in average all our pages:
<%
var qstring="dsn=mydsn;uid=user;pwd=pass"
var  ServerConnection=Server.CreateObject("ADODB.Connection"), RecordClone,
query;
//Initialize server connection
function CreateServer()
{
ServerConnection.Open(qstring);
}
//Finilize server connection
function DeleteServer(){
ServerConnection.Close();
ServerConnection=null;
}
//Function than runs sql query and in case of error parses error description
function runSQL(query) {
try {
RecordClone=ServerConnection.Execute(query);
return RecordClone;
}
catch (exception) {
Response.Write("<!--ERROR WAS ON PAGE: "+exception.description+"-->");
}
}
CreateServer();
...
var data = runSQL("select xx from yy"); //lots of simple queries
runSQL("update xx set yy=zz");
...
DeleteServer();
%>
Nothing special as you see. ODBC connection, some simple queries, html
output and thats all. Same sql queries which I launch in asp, through query
analyzer runs in 0 secs
We have windows2003(mdac 2.8), sql2000, iis6 and asp/asp.net applications on
it, also
sometimes we access sql server through access 2000/xp
applications.Previously
we had win2k and iss5 same trouble. And yes, we have Iframes in asp pages.
Overall system serves 50 users, approx 10 of them use server simultaneously
at one moment.
"Pat [MSFT]" rakstîja:
> IISState couldn't get to microsoft.com to get the symbols, so I can't tell
> you much.  But it does look like you are having a problem either in the
> parsing of the query or processng the results.  It doesn't look like there
> is a problem w/the SQL server.
>
> I would guess that you may have some query coming back that is huge (i.e.
> Select * FROM myTableOfOneMillionRows ).
>
> Pat
>
> "Janis Buks" <JanisBuks@discussions.microsoft.com> wrote in message
> news:63C8FBCF-8469-45D7-9CF6-3254EC10FCCE@microsoft.com...
> > Where could be problem in my IIS? Processing SQL is very slow sometimes.
> > Here is IISState log:
> > ***********************
> > Starting new log output
> > IISState version 3.0
> >
> > Tue Nov 02 15:52:20 2004
> >
> > OS = Windows 2003 Server
> > Executable: w3wp.exe
> > PID =  304
> >
> > Note: Thread times are formatted as HH:MM:SS.ms
> >
> > ***********************
> >
> >
> >...


Relevant Pages

  • [NT] Heap Overrun in HTR Chunked Encoding Could Enable Web Server Compromise
    ... This patch eliminates a newly discovered vulnerability affecting Internet ... in IIS 4.0 and 5.0, and could likewise be used to overrun heap memory on ... allowing code to be run on the server. ... * Microsoft has long recommended disabling HTR functionality unless there ...
    (Securiteam)
  • Re: IISState log (IIS slow)
    ... But it's only way to return IIS to normal life. ... > It doesn't matter if the file does not have any ASP code in it or not. ... which under any sort of appreciable load means your server is ... > reached its allowed processing time limit. ...
    (microsoft.public.inetserver.iis)
  • Re: Problem with connect computer wizard
    ... Make sure the Windows XP client is pointing to the SBS 2003 server as ... Please collect the IIS metabase and the latest IIS log files further ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: IIS Key pairs (how to export an IIS 4.0 self-issued Root CA a nd import into new IIS 4.0 box)
    ... IIS key to an Intel SSL acelerator ... it issues client certificates to the end users. ... Step I - Installing the New Server ... Install NT SP 3 ONLY ...
    (Focus-Microsoft)
  • Re: Problems with IIS 6.0 and downloading images.
    ... Try running "PerfMon" -- IIS has counters for this sort of information. ... within time limit" conflict with each other. ... processing is done on the server other than network IO -- which should not ... the website is in it's own app pool with default settings. ...
    (microsoft.public.inetserver.iis)