windows service startup timeout

前端 未结 4 741
粉色の甜心
粉色の甜心 2020-11-29 21:42

Is there a way to set a different value for service startup timeout per service? I can change it using the ServicesPipeTimeout registry key, but it\'s per machine (http://su

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 22:14

    It's good practice to finish starting your service as fast as possible. So, during the start state, do only what you absolutely need to acknowledge it started successfully; and do the rest later. If the start is still a lengthy process, use SetServiceStatus periodically to inform the Service Control Manager that you have not yet finished, so it does not time-out your service.

提交回复
热议问题