fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
21 stars 23 forks source link

Windows: Slow service start (fluent-package) #618

Closed daipom closed 3 months ago

daipom commented 4 months ago

Abst

Details

Windows service startup is noticeably slower for fluent-package. I'm talking about the time to reach the Running state. In other words, the time to finish StartServiceCtrlDispatcher. For td-agent, it takes about 5 seconds, but for fluent-package it can take more than 20 seconds.

Windows service needs to finish StartServiceCtrlDispatcher in 30 seconds by default. So, this problem can cause timeout errors.

EventID 7000

The testservice service failed to start due to the following error: 
The service did not respond to the start or control request in a timely fashion.

EventID 7009

A timeout was reached (30000 milliseconds) while waiting for the testservice service to connect.

Reproduce

If you try to start the service several times, it will often take 10 to 20 seconds.

I confirm this problem in the following:

Interestingly, this problem does not occur in t2.small EC2 instance type. I think it occurs in environments with multiple CPUs.

daipom commented 4 months ago

https://github.com/chef/win32-service/pull/85 will fix this issue.

kenhys commented 3 months ago

it should be fixed via #630