none
Windows Service not starting after computer shut down RRS feed

  • Question

  • Hi,

    we have a client server setup in which the server consists of a WCF service hosted as Windows Service. Further on, this service communicates with a database which is hosted in a sql server. Both SQL server and windows service can be on the same computer.

    What we experience lately is that either the SQL Server service or the Windows service sometimes (not always)  don't start automatically after computer (typically the computer run Windows 8 or Windows 10) gets restarted or shut down. We don't see any reason for this in the log file nor do we see anything in the event logs indicating why the specific service doesn't get started.

    Can anybody help please? Thanks in advance!

    Thursday, August 31, 2017 1:33 PM

All replies

  • I have SQL Sever service not start  sometimes on my Windows 10 machine too.
    Thursday, August 31, 2017 7:04 PM
  • Can you see evidence of the start and stop of the WCF service?  My hunch is it is timing related and the WCF Service tries to start but encounters a failure as a dependency is not ready yet.  Just a hunch based on previous experience where this happened.

    Cheers, Jeff

    Thursday, August 31, 2017 8:25 PM
  • Hi Mrki01,

    Is there any code or event in Windows Service start up? When did you connect to SQL Server?

    For SQL Server service did not start automatically, it has been reported SQL Server not coming online after OS upgrade to Windows 10, even when startup type is automatic, and the workaround it to delay the start of SQL Service.

    If you temporally comment out the code related with SQL, will the windows service start automatically?

    Best Regards,

    Edward


    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.

    Friday, September 1, 2017 1:56 AM
  • Hi Edward Z,

    we are connecting to the SQL Service right at the start of our Windows Service. Funny is that this behaviour is random. Mostly it succeeds, but sometimes not.

    So you the "Automatic (delayed)" option is a workaround for this problem? We'll try it out.

    Best regards,

    Mrki01

    Friday, September 1, 2017 6:48 AM
  • Hi Mrki01,

    Did the “Automatic(delayed)” option work for you?

    While your windows Service did not restart automatically, did the SQL Service restart correctly?

    If not, will this issue exist if you comment out the code related with connecting to SQL Service?

    Best Regards,

    Edward


    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.

    Monday, September 4, 2017 2:54 AM
  • Hi Edward,

    as mentioned previously, we are unfortunately not able to reproduce this error deliberately. We are still trying though. Until so far this error was happening only at customer.

    Best regards,

    Mrki01


    • Edited by Mrki01 Monday, September 4, 2017 7:51 AM
    Monday, September 4, 2017 7:51 AM
  • Hi Mrki01,

    Got it.

    If you have any update about this issue, please feel free to come back.

    If it did not happen for a long time, I would suggest you mark the helpful reply as answer to close this thread.

    Best Regards,

    Edward


    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.

    Tuesday, September 5, 2017 2:50 AM