Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daipom opened this issue Feb 16, 2024 · 2 comments
Closed

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

daipom opened this issue Feb 16, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@daipom
Copy link
Contributor

daipom commented Feb 16, 2024

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:

  • Windows 10 Home 64bit
    • 4 core CPU, 8 logical processors (Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 1.99GHz)
    • 16GB RAM
  • AWS EC2 instance Windows Server 2019 Base
    • t2.medium
    • t2.large
    • c5.large

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

@daipom
Copy link
Contributor Author

daipom commented Feb 28, 2024

chef/win32-service#85 will fix this issue.

kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 7, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 11, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service", branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 12, 2024
Until chef/win32-service#85 is merged,

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 12, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See fluent#618

Closes: fluent#630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit that referenced this issue Mar 13, 2024
Until chef/win32-service#85 is merged,
use forked version of win32-service.

This fix should be applied to fluent-package not to block starting
fluentdwinsvc service on Windows.

See #618

Closes: #630

NOTE: even though just putting the following line
does not install forked version of win32-service, so
install it explicitly as same as fluentd gem.

```
  gem "win32-service", github: "fluent-plugins-nursery/win32-service",
  branch: "fluent-package", platforms: [:mingw, :x64_mingw]
```

Signed-off-by: Kentaro Hayashi <[email protected]>
@kenhys
Copy link
Contributor

kenhys commented Mar 14, 2024

it should be fixed via #630

@kenhys kenhys closed this as completed Mar 14, 2024
daipom added a commit that referenced this issue Mar 27, 2024
Add a test for #618
On v5.0.2, I have confirmed it takes 4.6s ~ 6.7s.
Since v5.0.3, it takes less than 1s.

Signed-off-by: Daijiro Fukuda <[email protected]>
Co-authored-by: Kentaro Hayashi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants