| Author |
Message |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Wed Jan 13, 2010 9:24 pm Post subject: Win2K3, profiler v5.2.0.44 "Error stopping W3SVC" |
|
|
I'm running profiler 5.2.0.44, I start profiling using:
ASP.NET (hosted in IIS)
profile child process [checked]
monitor disposal of object [checked]
Original port (IIS will restart).
-> Start Profiling
I wait for the website to start and wait for the first page to load in the browser. Performance counters are working and show consitent behavior each profiling session.
-> Take memory snapshot
An error occurs:
"Error stopping W3SVC"
| Code: |
Error stopping W3SVC
RedGate.Profiler.Engine.Startup.IIS.IISException
stack trace:
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopServicesInOrder()
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopProfilingIIS()
at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StopProfilingIIS()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at RedGate.Profiler.Engine.Startup.IIISActuator`1.StopProfilingIIS()
at RedGate.Profiler.Engine.Startup.Sessions.IISSession`1.Stop()
at RedGate.Memory.Controller.Session.ProfilerSession.Stop()
at RedGate.Memory.Controller.Session.ProfilerSessionThreader.Stop()
at RedGate.Memory.Controller.ConceptManagers.ProfilingProgressManager.ProfilingProgressManager.m_State_Session_SnapshotCompleted(Object sender, EventArgs e)
at RedGate.Memory.Controller.Session.ProfilerSessionThreader.<>c__DisplayClass16.<backer_SnapshotCompleted>b__15()
at RedGate.Memory.Controller.WorkQueue.WorkQueue.Run()
Caused by:
Timed out starting 'W3SVC'
RedGate.Profiler.Engine.Startup.IIS.ServiceUtilitiesException
at RedGate.Profiler.Engine.Startup.IIS.ServiceUtilities.StopService(String serviceName)
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopServicesInOrder()
|
|
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Wed Jan 13, 2010 9:28 pm Post subject: |
|
|
I've tried this with and without:
<gcServer enabled="false" />
in aspnet.config |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Fri Jan 15, 2010 1:38 pm Post subject: |
|
|
Hi Jaap,
Unfortunately it's going to be difficult to tell why IIS cannot stop without first checking the system and/or application logs on the computer -- the problem is outside of ANTS Profiler because it's calling Windows APIs to start and stop the service. The WWW Service could be hung for some reason or not responding to a stop request.
Can I ask, do you need to use the profile on original port option? Using a custom port (8013 recommended) is a quicker and less complicated way of starting the web application on IIS 6. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Fri Jan 15, 2010 2:47 pm Post subject: |
|
|
Hi Brian,
For my information:
Why does ANTS profiler need to stop IIS when I press the Take snapshot button? Because that is what happens (IIS was already restarted by the profiler).
Jaap |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Fri Jan 15, 2010 4:20 pm Post subject: |
|
|
Hi Brian,
When I use port 8013 I get an error taking a snapshot:
| Code: |
The snapshot failed because .NET did not report every referenced object. This failure is most likely due to a bug in version 2 of the CLR that can be triggered when the garbage collector is operating in 'server mode' and the target application has many large objects.You can work around this bug by manually switching your application to the workstation garbage collector. See the MSDN documentation on the gcServer configuration option for information on how to acheive this.
|
I added <gcServer enabled="false" /> to
C:\WINDOWS\microsoft.net\Framework\v2.0.50727\aspnet.config
and I still get the same error.
But then I rembered that the system is 64 bits and that there is also a
C:\WINDOWS\microsoft.net\Framework64\v2.0.50727
directory.
After I added gcServer enabled="false" /> to
C:\WINDOWS\microsoft.net\Framework64\v2.0.50727\aspnet.config
It worked like a charm. Maybe you can add this 64bit gotcha in some FAQ?
So for now I'm satisfied with the workaround, but I'm still puzzled why the IIS restart is happening... |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Fri Jan 15, 2010 6:04 pm Post subject: |
|
|
The profiler is set up so that if a snapshot fails for any reason it tries to shut down the session. The error reporting isn't set up quite right: if the shutdown then fails, the original error is lost and the shutdown error reported instead (I've raised a bug about this; it's incorrect behaviour as the error is secondary and isn't any help in fixing the condition).
In this case, the profiler is detecting the condition that is caused by the gcServer issue and reporting it as a reason for failing the snapshot to the UI, which then shuts down the session in response. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Fri Jan 15, 2010 7:26 pm Post subject: |
|
|
I'm running fine right now, but suddenly (not pressed any button for a long time):
| Code: |
Error stopping W3SVC
RedGate.Profiler.Engine.Startup.IIS.IISException
stack trace:
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopServicesInOrder()
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopProfilingIIS()
at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StopProfilingIIS()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at RedGate.Profiler.Engine.Startup.IIISActuator`1.StopProfilingIIS()
at RedGate.Profiler.Engine.Startup.Sessions.IISSession`1.Stop()
at RedGate.Memory.Controller.Session.ProfilerSession.Stop()
at RedGate.Memory.Controller.Session.ProfilerSessionThreader.Stop()
at RedGate.Memory.Controller.ConceptManagers.ProfilingProgressManager.ProfilingProgressManager.m_State_Session_SnapshotCompleted(Object sender, EventArgs e)
at RedGate.Memory.Controller.Session.ProfilerSessionThreader.<>c__DisplayClass16.<backer_SnapshotCompleted>b__15()
at RedGate.Memory.Controller.WorkQueue.WorkQueue.Run()
Caused by:
Timed out starting 'W3SVC'
RedGate.Profiler.Engine.Startup.IIS.ServiceUtilitiesException
at RedGate.Profiler.Engine.Startup.IIS.ServiceUtilities.StopService(String serviceName)
at RedGate.Profiler.Engine.Startup.IISActuators.IISServiceRestarterActuator`1.StopServicesInOrder() |
I'm running with gcServer now, so this time, the actual error is also hidden .
Is there a log file in which the original error is present? |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Fri Jan 15, 2010 7:45 pm Post subject: |
|
|
I've found a log file, but I don't see really strange things in the logs.
Can I send a log file to someone?
No noticable eventlogs (other than some unhandled exceptions in the website) |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Fri Jan 15, 2010 7:53 pm Post subject: |
|
|
Unfortunately I ran this longrunning performance test with IIS restart to confirm that setting Framework64\aspnet.config gcServer="false" works.
So after the weekend I'll run with custom port again (have to alter load test in order to do that), and hope this error doesn't appear again or if it does, I can post a better stacktrace of the actual error. |
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 454
|
Posted: Thu Jan 28, 2010 12:14 pm Post subject: |
|
|
| How are your tests going now Jaap? |
|
| Back to top |
|
 |
jaap.q42
Joined: 17 Dec 2009 Posts: 26
|
Posted: Thu Feb 11, 2010 1:12 pm Post subject: |
|
|
Hi Chris,
I didn't run into the sudden exception anymore. From now on I'll use the "unused port" feature and set it to port 80 (I'll have to disable the site in iis), because of the firewall between the server and the load-test-host. |
|
| Back to top |
|
 |
|