Skip to content

Commit

Permalink
fix grpc stream timeout too fast preventing the dugging screen to sho…
Browse files Browse the repository at this point in the history
…w real time messages
  • Loading branch information
disk91 committed Sep 9, 2023
1 parent a930da5 commit 466dd64
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
16 changes: 16 additions & 0 deletions chirpstack/configuration/nginx/default.conf.nossl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ map $arg_override $override {
server {
listen 80;
listen [::]:80;
http2 on;

server_name @DOMAIN@;

Expand Down Expand Up @@ -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/) {
Expand Down
21 changes: 19 additions & 2 deletions chirpstack/configuration/nginx/default.conf.withssl
Original file line number Diff line number Diff line change
Expand Up @@ -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@;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 466dd64

Please sign in to comment.