[
https://issues.apache.org/jira/browse/THRIFT-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmytro Shteflyuk reassigned THRIFT-5949:
----------------------------------------
Assignee: Dmytro Shteflyuk
> Ruby server sockets do not enforce write timeouts on accepted connections
> -------------------------------------------------------------------------
>
> Key: THRIFT-5949
> URL: https://issues.apache.org/jira/browse/THRIFT-5949
> Project: Thrift
> Issue Type: Improvement
> Components: Ruby - Library
> Reporter: Dmytro Shteflyuk
> Assignee: Dmytro Shteflyuk
> Priority: Major
>
> Ruby server transports do not enforce a timeout on writes to accepted client
> sockets. Accepted sockets are wrapped with the default {{Thrift::Socket}}
> timeout of {{nil}}, and {{Thrift::Socket#write}} falls back to a blocking
> write in that case. A client that stops reading can therefore block a server
> thread indefinitely.
> h2. Impact
> * A single slow or stalled connection can hold a Ruby server worker forever.
> * This affects normal request/response handling, not just edge cases.
> * In threaded servers, enough blocked writers can exhaust available worker
> threads.
> h2. Cross-language Context
> Other Thrift runtimes handle this differently:
> * Some propagate server-side client timeouts to accepted sockets.
> * Some only apply read timeouts.
> * Some also leave writes unbounded by default.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)