fix: close pooled TLS before GCP LB idle timeout [CHA-4943] - #78
Merged
Conversation
GCP SSL-proxy load balancers close idle TLS around 30s while the SDK kept net_http_persistent connections for 55s, causing SSL_read EOF on the next request. Default idle_timeout is now 25s. Co-authored-by: Cursor <cursoragent@cursor.com>
Job-level if: vars.STREAM_GCP_BASE_URL is evaluated before the ci environment is applied, so environment variables never un-skip the job. The spec still skips unless STREAM_BASE_URL is a GCP edge hostname. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Summary
GCP SSL-proxy load balancers close idle TLS around ~30s. getstream-ruby kept
net_http_persistentconnections for 55s (AWS ALB idle minus 5s), so the next request failed withSSL_read: unexpected eof while readingand no matching API 5xx. Defaultidle_timeoutis now 25s so the client drops the connection first.Reproduced 3/3 at 35s idle against staging
chat-edge-us-east1-ce1.gcp.stream-io-api.comwith the old default; the new keep-alive spec passes at 35s withidle_timeout=25.Until this ships, customers can set
idle_timeout: 10orfaraday_adapter: :net_http.Test plan
idle_timeout=25STREAM_BASE_URL=https://chat-edge-us-east1-ce1.gcp.stream-io-api.com make test-integration-gcp-lb(35s idle, same client)STREAM_GCP_BASE_URLis set on theciGitHub environmentNotes
idle_timeout: 10or disable pooling.STREAM_GCP_BASE_URL(and optionallySTREAM_GCP_API_KEY/STREAM_GCP_API_SECRET) on thecienvironment.Made with Cursor