Previous Next

Thread: ASP files hang and eventually time out

Last post 03-05-2008 12:55 AM by qbernard. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 01-07-2008, 12:00 PM

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    ASP files hang and eventually time out

    Running IIS 6 on a Win 2003 machine. 1 CPU, 2GB RAM. Also Running MS SQL Server 2005 on the same machine (set to max 1GB Memory). No Exchange server. Everything has been fine up until 3 days ago when ASP pages started to hang and take very long time to execute (script time out is set to 120 secs and in most cases that times out - who would wait for 120 secs anyways..). Image and htm files are delivered OK.

    Some stats from perf mon:

    •  ASP / Requests Executing: 50 (this seldom goes over 50)
    •  ASP / Requests Executing: This keeps increasing, at peak is usually around 1000 - 1500 range
    • Memory / Available MBytes: 1414
    • Process / Private Bytes: Total : ~500MB (ranges between 400 and 600); inetinfo: 11.5MB (steady); SQL Server: 165MB (Ranges 90-250); w3wp: 75MB (When IIS is started, it starts with 60MB, then stabilizes around 75MB (peak 100MB)
    • Process / Virtual Bytes: Total: 3800MB - 4212MB (Virtual Bytes Peak: 4772MB)
    • Processor / % Processor Time : usually single digits (sometimes spikes to max 30%)
    • Web Service / Current Connections: peak we have seen was 2000, usually runs around 1200

    after some reading, we have made some configuration changes with no help. For instance, we have been recycling the worker processes (for the App Pools) every 15 seconds. We also set the MaxPoolThreads to 19.

     Any feedback to send us to the right direction would be highly appreciated. Thanks

     

     

  • 01-07-2008, 7:03 PM In reply to

    • davcox
    • Top 50 Contributor
    • Joined on 07-21-2006, 6:28 PM
    • Redmond
    • Posts 113

    Re: ASP files hang and eventually time out

    Can you isolate which ASP scripts are taking so long?  Look in your log files at the time-taken field to see which are the offensive ASP scripts.

    Then you'll need to look into why the that particular ASP code is taking so long.  Perhaps new SQL queries are longer than they used to be?  Or perhaps the data has changed such that the same queries are now taking longer.  It will take some debugging. 

    Tags:
  • 01-07-2008, 11:06 PM In reply to

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    Re: ASP files hang and eventually time out

    Thank you for the reply. There I will need some help... to isolate the asp scripts I mean. First, will need help to identify which log to look at.. iss's own log or logs generated by IIScrash/hang agent. Also what is the time that we should look for? During busy hours, when we restart the server, the problem starts happening again within one minute and there are many files (and scripts) being requested at the same time. so hard for us to pinpoint the suspect page.

  • 01-07-2008, 11:15 PM In reply to

    Re: ASP files hang and eventually time out

    That would be IIS web access log. Try this - the last IIS Insider column.
    http://www.microsoft.com/technet/community/columns/insider/default.mspx#EJF

    Cheers,
    Bernard Cheah
  • 01-08-2008, 10:59 AM In reply to

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    Re: ASP files hang and eventually time out

    very helpful, thank you. Ran a query with logparser to look at the top 10 files on our server that take the maximum time (time-taken). As suspected, all the files (also looked at the top 50, same situation) are taking over 2-3 minutes. No distinction between pages where there is a connection to the SQL database or not -- all taking a long time to execute and eventually timing out. Something must be wrong that is impacting the entire performance.

    When we set the application pool recycling to "every 10 minutes" we thought that it would be an effective band-aid. That seems to have no effect. Even a reboot of the server doesn't seem to correct the problem. after the reboot, ASP requests executing quickly maxes out at 50 and rest starts to get piled up in ASP Requests Queued.

    I will now run IIS Debug DiagTool to analyze Memory and Handle Leak for w3wp. Should we also try other rules (e.g., Crash or IIS Hang) or other processes than w3wp? I would be very interested to post the analysis report of the proper rule here so that expert guys can take a look at and provide any insights (assuming this is the best logical next step).

     Also, one bit of observation (for what it's worth), when we stop the SQL Server on the machine, the asp pages where there is no database connection in them start to execute fine (still slow response, but browser displays the file eventually). However, when we do that, we observed that the CPU utilization (%processor time) jumps to 100% and stays there. When the SQL Server is started again, the %processor time drops to something between 0-1% and stays there, spiking to 20% level occasionally. Not exactly sure what that means, but wanted to post this as well.

     

  • 01-09-2008, 12:05 AM In reply to

    Re: ASP files hang and eventually time out

    The hang rule should be good enough for your case as this is what you experiencing. You can post the log here, I'm not good in analyze debugdiag log, but i'm sure experts here will assist you.

    Cheers,
    Bernard Cheah
  • 01-09-2008, 8:37 AM In reply to

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    Re: ASP files hang and eventually time out

    Here is the analysis summary of the Hang Rule report generated shortly after the server was rebooted. Any help identifying what may be wrong would be very appreciated (I didn't post the entire report since it is very long, just pasting the analysis summary and items that were referenced in it)

    Warning #1: The following threads in w3wp.exe__appdomain__PID__3996__Date__01_08_2008__Time_03_22_43PM__421__IIS Hang Dump.dmp are making a COM call to thread 18 within the same process( 22 31 38 40 41 42 43 44 48 49 51 53 55 58 59 60 61 63 64 65 67 69 70 72 )48.00% of executing ASP Requests blocked30.00% of threads blocked  Warning #2:Detected possible blocking or leaked critical section at 1e00634 owned by thread 37 in w3wp.exe__appdomain__PID__3996__Date__01_08_2008__Time_03_22_43PM__421__IIS Hang Dump.dmpImpact of this lock4.00% of executing ASP Requests blocked2.50% of threads blocked(Threads 23 52)The following functions are trying to enter this critical sectionasp!CIncFile::AddTemplate+14The following module(s) are involved with this critical section\\?\C:\WINDOWS\system32\inetsrv\asp.dll from Microsoft Corporation Error #1: A COM+ STA Activity Pileup has been detected in w3wp.exe__appdomain__PID__3996__Date__01_08_2008__Time_03_22_43PM__421__IIS Hang Dump.dmp. There is more than one activity bound to every COM+ STA ThreadPool thread.See the COM+ STA ThreadPool Report for more detail. Warning 3#:2869 client connection(s) in w3wp.exe__appdomain__PID__3996__Date__01_08_2008__Time_03_22_43PM__421__IIS Hang Dump.dmp have been executing a request for more than 90 seconds.  Thread 18 - System ID 2768Entry point   pdm!DebuggerThreadEntry Create time   1/8/2008 2:45:58 PM Time spent in user mode   0 Days 0:0:0.656 Time spent in kernel mode   0 Days 0:0:2.640  This thread is waiting on a socket function to complete. Further review of these threads may be necessary to determine what they are waiting on. Function   Source ntdll!KiFastSystemCallRet    ntdll!NtWaitForSingleObject+c    mswsock!SockWaitForSingleObject+19d    mswsock!SockDoConnectReal+27a    mswsock!SockDoConnect+38a    mswsock!WSPConnect+be    ws2_32!connect+52    wininet!ICSocket::Connect_Start+22f    wininet!CFsm_SocketConnect::RunSM+42    wininet!CFsm::Run+39    wininet!DoFsm+25    wininet!ICSocket::Connect+32    wininet!HTTP_REQUEST_HANDLE_OBJECT::OpenConnection_Fsm+3b1    wininet!CFsm_OpenConnection::RunSM+33    wininet!CFsm::Run+39    wininet!DoFsm+25    wininet!HTTP_REQUEST_HANDLE_OBJECT::OpenConnection+2f    wininet!HTTP_REQUEST_HANDLE_OBJECT::MakeConnection_Fsm+87    wininet!CFsm_MakeConnection::RunSM+2e    wininet!CFsm::Run+39    wininet!DoFsm+25    wininet!HTTP_REQUEST_HANDLE_OBJECT::SendRequest_Fsm+9b    wininet!CFsm_SendRequest::RunSM+2e    wininet!CFsm::Run+39    wininet!DoFsm+25    wininet!HTTP_REQUEST_HANDLE_OBJECT::HttpSendRequest_Start+450    wininet!CFsm_HttpSendRequest::RunSM+59    wininet!CFsm::Run+39    wininet!DoFsm+25    wininet!HttpWrapSendRequest+127    wininet!HttpSendRequestA+1d    ASPtear!DllUnregisterServer+1a809    ASPtear!DllUnregisterServer+7ef    ASPtear!DllUnregisterServer+1e172    oleaut32!IDispatch_Invoke_Stub+52    oleaut32!IDispatch_RemoteInvoke_Thunk+5b    rpcrt4!NdrStubCall2+214    rpcrt4!CStdStubBuffer_Invoke+c6    oleaut32!CStubWrapper::Invoke+9f    ole32!SyncStubInvoke+33    ole32!StubInvoke+a7    ole32!CCtxComChnl::ContextInvoke+e3    ole32!MTAInvoke+1a    ole32!STAInvoke+48    ole32!AppInvoke+a3    ole32!ComInvokeWithLockAndIPID+2c5    ole32!ComInvoke+9f    ole32!ThreadDispatch+23    ole32!ThreadWndProc+fe    user32!InternalCallWinProc+28    user32!UserCallWinProcCheckWow+151    user32!DispatchMessageWorker+327    user32!DispatchMessageW+f    pdm!CDebuggerThread::CallableWaitForMultiple+cf    pdm!CDebuggerThread::ThreadEntry+6a    pdm!DebuggerThreadEntry+9    kernel32!BaseThreadStart+34 Locked critical section reportCritical Section    1e00634  Lock State   Locked Lock Count   2 Recursion Count   1 Entry Count   0 Contention Count   3 Spin Count   1000 Owner Thread   37 Owner Thread System ID   2264 Thread 37 - System ID 2264Entry point   msvcrt!_endthreadex+2f Create time   1/8/2008 2:46:24 PM Time spent in user mode   0 Days 0:0:0.46 Time spent in kernel mode   0 Days 0:0:0.15  Function   Source ntdll!KiFastSystemCallRet    ntdll!NtWaitForMultipleObjects+c    kernel32!WaitForMultipleObjectsEx+11a    kernel32!WaitForMultipleObjects+18    pdm!CProcessThread::WaitForMultiple+14    pdm!CProcessThread::CallableWaitForMultiple+49    pdm!CProcessThread::ThreadRequest+119    pdm!CProcessThread::SynchronousCallInThread+68    pdm!CDebugApplication::SynchronousCallInDebuggerThread+26    asp!InvokeDebuggerWithThreadSwitch+80    asp!CIncFile::AddTemplate+92    asp!CTemplate::ProcessIncludeFile2+1f0    asp!_pRawDllMain <PERF> (asp+0x56513)    asp!CTemplate::ProcessSegment+b3    asp!CTemplate::ExtractAndProcessSegment+1c6    asp!CTemplate::GetSegmentsFromFile+f9    asp!CTemplate::ProcessIncludeFile2+21f    asp!_pRawDllMain <PERF> (asp+0x56513)    asp!CTemplate::ProcessSegment+b3    asp!CTemplate::ExtractAndProcessSegment+1c6    asp!CTemplate::GetSegmentsFromFile+f9    asp!CTemplate::Compile+1ee    asp!CTemplateCacheManager::Load+2ff    asp!LoadTemplate+88    asp!CHitObj::ViperAsyncCallback+38b    asp!CViperAsyncRequest::OnCall+92    comsvcs!CSTAActivityWork::STAActivityWorkHelper+32    ole32!EnterForCallback+c4    ole32!SwitchForCallback+1a3    ole32!PerformCallback+54    ole32!CObjectContext::InternalContextCallback+159    ole32!CObjectContext::DoCallback+1c    comsvcs!CSTAActivityWork::DoWork+12d    comsvcs!CSTAThread::DoWork+18    comsvcs!CSTAThread::ProcessQueueWork+37    comsvcs!CSTAThread::WorkerLoop+17c    msvcrt!_endthreadex+a3    kernel32!BaseThreadStart+34      ASP request executing on thread   37 GET request for   /news/hizle.asp Request alive for   0 day(s) 00:36:11 QueryString   k=WU0f5crL9IQ&t=Navin Request mapped to   D:\HTTP\appdomain.com\news\hizle.asp ASP Application   /LM/W3SVC/1737085689/Root  Script call stack for thread 37 

     

  • 01-11-2008, 2:40 AM In reply to

    Re: ASP files hang and eventually time out

    Errr hard to read. there's .mht file, right? attach it ? I'm not sure what's going on though :)

    Cheers,
    Bernard Cheah
  • 01-11-2008, 10:26 AM In reply to

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    Re: ASP files hang and eventually time out

    Sorry it didn't really paste that well. Here is the link for the full mht file (generated earlier this morning, same "warning" message that I pasted above earlier:

     http://*server*/hang.mht

     The analysis summary section included only one warning (as you will see following the link above), which was:

    Description: 

    The following threads in w3wp.exe__ApplicationPool__PID__1820__Date__01_11_2008__Time_01_01_18AM__812__IIS Hang Dump.dmp are making a COM call to thread 19 within the same process

    ( 25 26 30 31 32 33 37 38 39 40 41 42 45 46 50 52 54 )

    70.83% of executing ASP Requests blocked

    30.36% of threads blocked

    Recommendation: 

    Several threads making calls to the same STA thread can cause a performance bottleneck due to serialization.

    Note: This STA thread is one of the special-purposed STA threads in the process. This particular STA thread is used to service calls for all instances of all components with ThreadingModel = 'Single' or '' (the "main STA"). To avoid serializing multiple concurrent calls to the Main STA thread, change the ThreadingModel of the COM component from 'Single' to something compatible with the apartment type of the client thread (i.e. 'Both', 'Neutral', or 'Apartment' for STA clients, or 'Both', 'Neutral', or 'Free' for MTA clients.

     

    Thank you for all your help!!!


     

     

  • 01-12-2008, 12:41 AM In reply to

    Re: ASP files hang and eventually time out

    Wow... but I'm good in analyzing debugdiag log. we just know long running asp pages is waiting for COM object processing in STA - single thread apartment mode. the objects include - xobjRSS, SOFTWING.ASPtear. These are inhouse or vendor? you might want to check with them. And if you need fast response, get intouch with Microsoft PSS to open a support case.

    Cheers,
    Bernard Cheah
  • 02-29-2008, 4:37 PM In reply to

    • tolgs
    • Not Ranked
    • Joined on 01-07-2008, 4:35 PM
    • Posts 9

    Re: ASP files hang and eventually time out

    it's been a while but just wanted to drop a quick note for closure. it was an ASPTear related problem. For some reason it was not stable under heavy concurrent demand. Removing two offending pages and using a cached version of those solved the problem. thanks

  • 03-05-2008, 12:55 AM In reply to

    Re: ASP files hang and eventually time out

    wohoo! thanks for the update.

    Cheers,
    Bernard Cheah
Page 1 of 1 (12 items)
Page view counter