Skip to content

Raise default timeout to 30s, add 10s connect timeout - #283

Closed
mroloux wants to merge 1 commit into
masterfrom
matti/seats-1827-seatsio-java-raise-default-timeout-to-30s-10s-connect
Closed

mroloux wants to merge 1 commit into
masterfrom
matti/seats-1827-seatsio-java-raise-default-timeout-to-30s-10s-connect

Conversation

@mroloux

@mroloux mroloux commented Oct 26, 2026

Copy link
Copy Markdown
Member

https://linear.app/seatsio/issue/SEATS-1827

Issue: The default 10s timeout is too short when requests wait in Cloud Run's queue during traffic spikes, so customers see timeouts on requests that would have succeeded.

Fix: The read timeout now defaults to 30s and there is a separate 10s connect timeout. Both can be overridden per client with connectTimeout(Duration) and socketTimeout(Duration). Timed-out requests are still not retried.

…igurable

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new timeout assignment overrides an existing test's request-level timeout, invalidating its expected exception assertion.

1 open issue
What changed in this PR

This PR increases the client's default read timeout to accommodate requests queued during traffic spikes and adds separate connection-timeout configuration.

Changes:

  • Sets defaults to 30 seconds for reads and 10 seconds for connections.
  • Adds per-client timeout configuration through fluent Duration setters.
  • Documents timeout behavior and adds a local-server test for configurable read timeouts and no retries.
File Description
src/​test/​java/​seatsio/​TimeoutTest.java Tests configurable read timeouts and no retries after timeout.
src/​main/​java/​seatsio/​util/​UnirestWrapper.java Sets timeout defaults and applies per-client values to requests.
src/​main/​java/​seatsio/​SeatsioClient.java Exposes fluent connection and read timeout setters.
README.md Documents defaults, configuration, and timeout behavior.

Review effort: Balanced

AtomicReference<byte[]> responseBody = new AtomicReference<>();
request.header("X-Client-Lib", "Java");
request.connectTimeout(connectTimeoutMillis);
request.socketTimeout(socketTimeoutMillis);
@mroloux mroloux closed this Oct 26, 2026
@mroloux
mroloux deleted the matti/seats-1827-seatsio-java-raise-default-timeout-to-30s-10s-connect branch October 26, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants