feat(nginx/config): allow overwrite of proxy_read_timeout through yaml#615
Merged
Conversation
dmonojit
approved these changes
May 6, 2026
thijmv
reviewed
May 7, 2026
Collaborator
There was a problem hiding this comment.
Since this change forces the proxy_timeout to be set in the Nginx config, each proxy_read_timeout would consequently be set. Would this not mean that each if-statement automatically evaluates to true and thus never applies the default timeouts?
Collaborator
Author
Yes, that's true. I removed the error and now let the user decide if they want to keep the defaults or override them. |
thijmv
approved these changes
May 7, 2026
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.
Set explicit defaults for the
proxy_read_timeoutsetting for all kraken services' nginx configs and allow overriding them through the yaml config.proxy_read_timeoutconfigures a timeout for the service's APIs that is triggered after the API has not responded with any data for the respective duration. NOTE that if the API returns some data, but not all data, the timeout does not trigger.A problematic part of this setting is that while it is intended to trigger when the server is completely inresponsive (e.g. a blob download not starting after X minutes), it does NOT work like that with agent's download blob API. This happens as the agent does not start streaming data to its consumer until it has fully downloaded and cached it on disk. Therefore,
proxy_read_timeoutends up functioning as a end-to-end API timeout.Another problem is that the setting's default is 60s if not set explicitly - the current situation in agent. To avoid unnecessary server-side timeouts in agent (upon which the agent does not abort the download btw), I'm bumping the default to 10m. Keep in mind the agent already has an internal
timeoutbuilt in when a torrent download doesn't make progress for 5m.To avoid such an issue in the future, I am explicitly defining service-specific defaults in each service's nginx config file.
Timeouts before vs after this PR: