Skip to content

Improve timeouts and exception handling#18

Merged
OndraFiedler merged 3 commits intorecombee:masterfrom
marshalium:improved_timeouts
Sep 19, 2025
Merged

Improve timeouts and exception handling#18
OndraFiedler merged 3 commits intorecombee:masterfrom
marshalium:improved_timeouts

Conversation

@marshalium
Copy link
Copy Markdown
Contributor

Adds the cause to exceptions when catching/throwing errors.

Sets okhttp's callTimeout to ensure that requests are interrupted if they take too long.

Setting callTimeout() to 2x the actual timeout in an attempt to be careful about not impacting existing http/socket timeout behavior. And to only interrupt if it's taken an unreasonable length of time. This is also the ratio that okhttp uses in their examples

This helps with debugging underlying issues
This is 2x the other timeouts because I don't want to change the
current http timeout behavior. This overall timeout is only a safety
measure for when the other timeouts fail us
@vallpaper vallpaper requested a review from OndraFiedler August 29, 2025 11:13
@OndraFiedler OndraFiedler merged commit f6cf1cd into recombee:master Sep 19, 2025
@OndraFiedler
Copy link
Copy Markdown
Member

@marshalium Thanks for the PR! It has been released in v5.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants