diff --git a/deploy/docker-swarm/common/nginx-config.conf b/deploy/docker-swarm/common/nginx-config.conf index 738805f89f46..a8673496a2ed 100644 --- a/deploy/docker-swarm/common/nginx-config.conf +++ b/deploy/docker-swarm/common/nginx-config.conf @@ -30,6 +30,8 @@ server { location /api { proxy_pass http://query-service:8080/api; + # connection will be closed if no data is read for 600s between successive read operations + proxy_read_timeout 600s; } # redirect server error pages to the static page /50x.html diff --git a/deploy/docker/common/nginx-config.conf b/deploy/docker/common/nginx-config.conf index 738805f89f46..a8673496a2ed 100644 --- a/deploy/docker/common/nginx-config.conf +++ b/deploy/docker/common/nginx-config.conf @@ -30,6 +30,8 @@ server { location /api { proxy_pass http://query-service:8080/api; + # connection will be closed if no data is read for 600s between successive read operations + proxy_read_timeout 600s; } # redirect server error pages to the static page /50x.html diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go index 1dc342390e7f..cb1ef91dff00 100644 --- a/pkg/query-service/app/http_handler.go +++ b/pkg/query-service/app/http_handler.go @@ -2190,6 +2190,8 @@ func (aH *APIHandler) tailLogs(w http.ResponseWriter, r *http.Request) { RespondError(w, &err, "streaming is not supported") return } + // flush the headers + flusher.Flush() for { select {