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: Disable specifying linger_timeout again #2959

Merged
merged 1 commit into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,12 @@ def create_transfer_socket(host, port, hostname, &block)
cert_logical_store_name: @tls_cert_logical_store_name,
cert_use_enterprise_store: @tls_cert_use_enterprise_store,

linger_timeout: @send_timeout,
Copy link
Member

Choose a reason for hiding this comment

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

Does L399 need the same change?

Copy link
Contributor Author

@cosmo0920 cosmo0920 Apr 17, 2020

Choose a reason for hiding this comment

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

I think L399 needn't to apply same change.
On windows, out_forward can send events in TCP with linger_timeout case.

# Enabling SO_LINGER causes tcp port exhaustion on Windows.
# This is because dynamic ports are only 16384 (from 49152 to 65535) and
# expiring SO_LINGER enabled ports should wait 4 minutes
# where set by TcpTimeDelay. Its default value is 4 minutes.
# So, we should disable SO_LINGER on Windows to prevent flood of waiting ports.
linger_timeout: Fluent.windows? ? nil : @send_timeout,
send_timeout: @send_timeout,
recv_timeout: @ack_response_timeout,
connect_timeout: @connect_timeout,
Expand Down