Skip to content

feat(in_exec): add command_timeout option to limit child process exec…#5320

Merged
kenhys merged 3 commits intofluent:masterfrom
zoklk:master
Apr 16, 2026
Merged

feat(in_exec): add command_timeout option to limit child process exec…#5320
kenhys merged 3 commits intofluent:masterfrom
zoklk:master

Conversation

@zoklk
Copy link
Copy Markdown
Contributor

@zoklk zoklk commented Apr 10, 2026

Which issue(s) this PR fixes:
Fixes #5319

What this PR does / why we need it:
Adds command_timeout option to in_exec plugin, mirroring the existing
command_timeout option in out_exec.

Currently, in_exec calls child_process_execute without wait_timeout,
defaulting to nil (infinite wait). When the external command hangs,
Fluentd repeatedly shows previous child process is still running. skipped.
with no indication of the actual cause, making troubleshooting difficult.

out_exec already exposes command_timeout which maps to wait_timeout
in child_process_execute. This PR resolves the inconsistency between
the two plugins.

Docs Changes:
fluent/fluentd-docs-gitbook#619

Release Note:
Add command_timeout option to in_exec plugin to kill long-running
child processes and align behavior with out_exec.

zoklk added 2 commits April 10, 2026 08:27
…ution time

Signed-off-by: zoklk <bjincheol34@gmail.com>
Signed-off-by: zoklk <bjincheol34@gmail.com>
@Watson1978
Copy link
Copy Markdown
Contributor

Hi @zoklk, thanks for this great PR!
Could you also send a PR to the fluentd-docs-gitbook repository to add the documentation for the new command_timeout parameter instead of following?

**Docs Changes**:
The `command_timeout` option should be added to the in_exec documentation
at https://docs.fluentd.org/input/exec

@zoklk
Copy link
Copy Markdown
Contributor Author

zoklk commented Apr 10, 2026

Hi @Watson1978 , I've sent a PR to the fluentd-docs-gitbook repository for the command_timeout documentation.

fluent/fluentd-docs-gitbook#619

@Watson1978
Copy link
Copy Markdown
Contributor

@zoklk Thank you so much!

@Watson1978 Watson1978 added this to the v1.20.0 milestone Apr 10, 2026
@Watson1978 Watson1978 added the enhancement Feature request or improve operations label Apr 10, 2026
Watson1978
Watson1978 previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Contributor

@Watson1978 Watson1978 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@kenhys Can you also review this PR?

Comment thread test/plugin/test_in_exec.rb Outdated
Signed-off-by: zoklk <bjincheol34@gmail.com>
@kenhys
Copy link
Copy Markdown
Contributor

kenhys commented Apr 14, 2026

waiting CI...

@kenhys kenhys merged commit 6a27913 into fluent:master Apr 16, 2026
21 checks passed
@kenhys
Copy link
Copy Markdown
Contributor

kenhys commented Apr 16, 2026

@zoklk Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request or improve operations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(in_exec): add command_timeout option to kill long-running child processes

3 participants