-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add more timeout configs in the nginx-root-sample file #13477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What issue is this solving? Defaults for all 4 values are 60 seconds: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout Allowing connections resp. individual packets to hang for 1 hour might cause other issues if the backend resp. client remain unresponsive, like max threads/connections running full, connection queries running full, potentially memory issues etc. In slow network environments it might be a workaround to increase these timeouts, so it might be not a bad idea to expose those settings, but I would not implement it with a 60x higher default. In any case, if wanted, please add those to the sub dir config as well, they should be kept in sync. |
Can we try first if 30 minutes is enough for very large files? And maybe make an additional comment in docs that this is related for uploading of very large files with webui? |
5e0f95a
to
c95235a
Compare
@MichaIng Thank you for the feedback. The precise issue that motivates this change is that uploading big files fails with: The root cause might be a slow NFS filesystem. This is indeed a workaround but that might be the only option in some cases. I've adjusted those values back to their default: 60s. The main goal is to make them configurable in an enterprise-aio setup. |
c95235a
to
e5f950b
Compare
According to the docs, these settings are not affecting the max transfer time, but only the time it takes to (re)connect to proxy/client, respectively the time between two packets (read resp write operations). So it is about if backend/client turn unresponsive, how long the connection shall wait idle before giving up.
Hmm, and that example was actually hanging for such a long time, or did only the proxy handler expect response headers while the backend was synchronously receiving/writing the large file? Also do really all 4 settings need to be adjusted for this very specific case, or is Maybe this can be better solved in Nextcloud code (mid-term at least). I am no WebDAV expert, but maybe there is a way to send the expected response headers (and in case keep sending some "I am alive" signals) while the backend is waiting for the slow filesystem or while uploads/writes to it are done.
Understood. I guess they could be even kept commented by default in this case, so they have a place in the config, but need to be uncommented to override Nginx or parent config defaults. |
…nx-subdir.conf.sample files Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…bdir.conf.sample Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
e5f950b
to
8486c74
Compare
@MichaIng Not knowing that for sure is a good reason IMO to allow the admins to change any of those values in enterprise-aio. @szaimen Is it fine to have those values commented for the rest of the work in enterprise-aio to have new env vars to set those vaues? |
yes. It is fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
To later make these timeout values configurable