From 466dd64186e3d1ee3715c1dec28dbc6770fd9c95 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 9 Sep 2023 14:28:21 +0200 Subject: [PATCH] fix grpc stream timeout too fast preventing the dugging screen to show real time messages --- .../configuration/nginx/default.conf.nossl | 16 ++++++++++++++ .../configuration/nginx/default.conf.withssl | 21 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/chirpstack/configuration/nginx/default.conf.nossl b/chirpstack/configuration/nginx/default.conf.nossl index 27c574c0..5ab45248 100644 --- a/chirpstack/configuration/nginx/default.conf.nossl +++ b/chirpstack/configuration/nginx/default.conf.nossl @@ -22,6 +22,7 @@ map $arg_override $override { server { listen 80; listen [::]:80; + http2 on; server_name @DOMAIN@; @@ -75,6 +76,21 @@ server { proxy_set_header Host $http_host; } + location /api.InternalService/StreamDeviceEvents { + grpc_pass grpc://chirpstack; + grpc_set_header Host $host; + grpc_set_header X-Real-IP $remote_addr; + grpc_read_timeout 1h; + grpc_send_timeout 1h; + } + + location /api.InternalService/StreamDeviceFrames { + grpc_pass grpc://chirpstack; + grpc_set_header Host $host; + grpc_set_header X-Real-IP $remote_addr; + grpc_read_timeout 1h; + grpc_send_timeout 1h; + } # uncomment when forwarder is deployed # location ~ ^(/forwarder1/) { diff --git a/chirpstack/configuration/nginx/default.conf.withssl b/chirpstack/configuration/nginx/default.conf.withssl index 1e43cbef..0ca12827 100644 --- a/chirpstack/configuration/nginx/default.conf.withssl +++ b/chirpstack/configuration/nginx/default.conf.withssl @@ -35,8 +35,9 @@ server { } server { - listen 443 default_server ssl http2; - listen [::]:443 ssl http2; + listen 443 default_server ssl; + listen [::]:443 ssl; + http2 on; server_name @DOMAIN@; @@ -96,6 +97,22 @@ server { proxy_set_header Host $http_host; } + location /api.InternalService/StreamDeviceEvents { + grpc_pass grpc://chirpstack; + grpc_set_header Host $host; + grpc_set_header X-Real-IP $remote_addr; + grpc_read_timeout 1h; + grpc_send_timeout 1h; + } + + location /api.InternalService/StreamDeviceFrames { + grpc_pass grpc://chirpstack; + grpc_set_header Host $host; + grpc_set_header X-Real-IP $remote_addr; + grpc_read_timeout 1h; + grpc_send_timeout 1h; + } + location ~ ^/rest-api/ { rewrite ^/rest-api/(.*) /$1 break; proxy_pass http://chirpstack-api;