Closed sichanyoo closed 5 months ago
Update:
The connetTimeout
config exposed in SDK via HttpClientConfiguration
is used for connection timeout by the CRT runtime library. Currently there is no configuration exposed in SDK that allows any other timeout (e.g., socket timeout). HttpMonitoringOptions
and timeToFirstByte
configs in CRT would allow this, which first need to be bound to swift and exposed by aws-crt-swift.
PR linked above depends on below perequisites:
HTTPMonitoringOptions
public for usage in smithy-swift.Shipped in AWS SDK for Swift 0.40.0
Describe the bug
With the
HttpClientConfiguration
'sconnectTimeOut
setting set to a short duration (e.g., 1 second), the CRT HTTP client must time out when the server does not send a response. Instead, it stalls, waiting for the response that will never come. This behavior was detected by running localhost:3000 server that simulates an AWS service (DynamoDB in this instance) and sending it a request with HTTP protocol.Expected Behavior
CRT HTTP client should cut the connection when server does not respond beyond the timeout configuration setting on
HttpClientConfiguration
.Current Behavior
CRT HTTP client does not cut the connection, and the connection stalls with no end.
Reproduction Steps
1.. Ask @sichanyoo for the script that simulates AWS service servers.
./aarch64-apple-darwin-retry-diagnostics --service dynamodb
. This will start up the localhost server listening on port 3000.Possible Solution
No response
Additional Information/Context
No response
AWS SWIFT SDK version used
0.35.0
Compiler and Version used
Xcode 15.1
Operating System and version
MacOS Sonoma 14.3