Red Gate forums :: View topic - Win2K3, profiler v5.2.0.44 "Error stopping W3SVC"
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler Previous Versions
ANTS Memory Profiler Previous Versions forum

Win2K3, profiler v5.2.0.44 "Error stopping W3SVC"

Search in ANTS Memory Profiler Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Wed Jan 13, 2010 9:24 pm    Post subject: Win2K3, profiler v5.2.0.44 "Error stopping W3SVC" Reply with quote

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
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Wed Jan 13, 2010 9:28 pm    Post subject: Reply with quote

I've tried this with and without:
<gcServer enabled="false" />
in aspnet.config
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6673

PostPosted: Fri Jan 15, 2010 1:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Fri Jan 15, 2010 2:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Fri Jan 15, 2010 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Fri Jan 15, 2010 6:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Fri Jan 15, 2010 7:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Fri Jan 15, 2010 7:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Fri Jan 15, 2010 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Thu Jan 28, 2010 12:14 pm    Post subject: Reply with quote

How are your tests going now Jaap?
Back to top
View user's profile Send private message
jaap.q42



Joined: 17 Dec 2009
Posts: 26

PostPosted: Thu Feb 11, 2010 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group