fix for TUS uploads timing out (#1052)
* increase timeouts * align * remove client_header_timeout * temporarily increase limit * disable proxy buffering off * formatting * disable proxy request bufferring * do not use upgrade * 6 parallel connections * test * test * test * test * test * test * test * test * test * make sure it all works * make sure it all works * limit back to 1
This commit is contained in:
parent
30473426df
commit
ec60e00bf4
|
@ -330,18 +330,21 @@ server {
|
|||
include /etc/nginx/conf.d/include/cors;
|
||||
include /etc/nginx/conf.d/include/track-upload;
|
||||
|
||||
client_max_body_size 50M; # tus chunks size is 40M + leaving 10M of breathing room
|
||||
# TUS chunks size is 40M + leaving 10M of breathing room
|
||||
client_max_body_size 50M;
|
||||
|
||||
# Those timeouts need to be elevated since skyd can stall reading
|
||||
# data for a while when overloaded which would terminate connection
|
||||
client_body_timeout 1h;
|
||||
proxy_send_timeout 1h;
|
||||
|
||||
# increase request timeouts
|
||||
proxy_read_timeout 600;
|
||||
proxy_send_timeout 600;
|
||||
|
||||
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
|
||||
proxy_set_header Expect $http_expect;
|
||||
# Add X-Forwarded-* headers
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# rewrite proxy request to use correct host uri from env variable (required to return correct location header)
|
||||
set_by_lua $SKYNET_SERVER_API 'return os.getenv("SKYNET_SERVER_API")';
|
||||
proxy_redirect https://siad $SKYNET_SERVER_API;
|
||||
proxy_redirect $scheme://$host $SKYNET_SERVER_API;
|
||||
|
||||
# proxy /skynet/tus requests to siad endpoint with all arguments
|
||||
proxy_pass http://siad;
|
||||
|
|
Reference in New Issue