none
Windows service sometimes doesn't start after restart RRS feed

  • Question

  • I made an application that runs as a windows service with a startup type set to "Automatic". Sometimes after computer restart, service doesn't start. I have set NLog logging and Event Logs on start of Main and OnStart methods and after that start after restart "failure" there are no logs neither on file system nor event logs in EventViewer\ApplicationLogs, as that methods haven't even been called.
    There is Service Control Manager  7009 error logged in 
    EventViewer\System logs that says that my service didn't respond in a 30000ms and I am pretty sure that the call hasn't been made to my service.
    During my tests I have found out that sometimes even popular applications as Windows Defender and Team Viewer haven't started automatically. 
    After boot, i could always start service manually without any kind of problem.
    For now, it occurred only on computers with poor configuration with installed Windows 10 Pro, Version 1803.
    After adding ServicesPipeTimeout variable to registry and increasing the timeout value for the service startup that problem stopped occurring.
    I could propose this as fix to my clients, but I would like to deliver it with some valid explanation for customers why should i made them add/update information (which is general to all windows services, not to my app only) in their registries.
    Did anybody have similar problem? 
    Is this registered microsoft bug? 

    Wednesday, September 12, 2018 1:47 PM

All replies

  • Hi Dusan Gataric,

    Thank you for posting here.

    For your question, maybe some settings in Windows 10 Pro Version 1803 are conflict with your application. You could post your bug in the link below.

    https://developercommunity.visualstudio.com/spaces/61/index.html

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 13, 2018 2:59 AM
  • Hi Wendy,

    Thanks for the reply. 
    I suspect that there is some Windows OS component that my application needs to be running, but that services code doesn't include anything else but a few .NET framework libraries and its only purpose is to start some other windows services via ServiceController. 
    And as I said, Windows Defender was also not started, and its a part of a Windows OS.
    I would expect it to be some booting problem but before I start analyzing booting sequence, I would like to check if anybody else had experience with this.
    Thank you for the link, I will post my question there also.



     
    Thursday, September 13, 2018 6:34 AM