Issue profiling Windows Service

Hello,
When I try to profile a Windows Service application, I get the following error from Ants Profiler 3.

Start profiling
There was a problem starting the profiler.

Couldn't restart the service (timeout)

Please check the event log for more details
OK

Is there anyway to resolve this issue?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    Does the application or system even log list any further information about why the service had failed to start? It may be taking too long or possibly it crashes when being run by profiler.

    I doubt the first one because in version 3, the amount of time that Profiler waits for the service has been dramatically increased. It used to be 30 seconds in version 2, which used to cause this in the past because Profiler was slowing down the application pretty significantly.
  • I didn't find anything that tells me if there is something wrong with the Windows Service that I was trying to profile. I can start the Windows Service and runs fine if I don't profile it with Ants Profiler.

    Is there any config file that I can tweak to increase the timeout seconds even further? And what is the default timeout seconds for Ants Profiler?
  • The timeouts are hard-coded in this version of ANTS Profiler. We will wait 300 seconds for the service to shutdown and another 300 seconds for it to startup.

    I'm surprised your service can take so long to startup. Perhaps if you try restricting the namespaces that you are profiling by using a custom filter or even trying it in 'fast-mode' to see if works then.

    If necessary you could use the API for really fine grained control of what you're profiling.

    While I'm on an idea brainstorm you could start profiling with the profiler disabled on the toolbar then turn it on when you're doing interesting things that you want to profile perhaps?

    A few things there for you to try.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.