[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: nginx: hydra.gnu.org: Reduce the proxy timeouts.
From: |
Ludovic Courtès |
Subject: |
03/04: nginx: hydra.gnu.org: Reduce the proxy timeouts. |
Date: |
Thu, 17 Mar 2016 14:21:19 +0000 |
civodul pushed a commit to branch master
in repository maintenance.
commit 8055ddf5d0ce2b8b1648f58013a900091bce82f2
Author: Ludovic Courtès <address@hidden>
Date: Thu Mar 17 15:19:31 2016 +0100
nginx: hydra.gnu.org: Reduce the proxy timeouts.
---
hydra/nginx/hydra.gnu.org-locations.conf | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/hydra/nginx/hydra.gnu.org-locations.conf
b/hydra/nginx/hydra.gnu.org-locations.conf
index 3c9b1df..6f0fbe9 100644
--- a/hydra/nginx/hydra.gnu.org-locations.conf
+++ b/hydra/nginx/hydra.gnu.org-locations.conf
@@ -61,9 +61,18 @@ location ~ \.narinfo$ {
# For HTTP pipelining. This has a dramatic impact on performance.
client_body_buffer_size 128k;
+ # Do not tolerate slowness of hydra.gnu.org when fetching
+ # narinfos: better return 504 quickly than wait forever. However,
+ # since hydra.gnu.org is often overloaded, keep the timeouts not
+ # too small.
+ proxy_connect_timeout 4s;
+ proxy_read_timeout 6s;
+ proxy_send_timeout 6s;
+
# Enable caching for narinfo files, to avoid recomputing nar signatures.
proxy_cache narinfo;
proxy_cache_valid 200 7d; # cache hits for 7 days.
+ proxy_cache_valid 504 2m; # timeout, when hydra.gnu.org is overloaded
proxy_cache_valid any 1m; # cache misses/others for 1 min.
# Add 'Expires' and 'Cache-Control' response headers so clients