LoraWan Frames come with 5 min delay when using NGINX as proxy

Greetings,

I noticed a strange change right after I configured the nginx for https > all the frames from different nodes are coming with ~5 min delay.

I am using Chirpstack v4.
Tried different Internet provider, different GWs, nodes. Same.

Is that an expected behavior? Sorry for generic question, maybe anyone has faced it also, before I dig deeper?

Thanks

Short feedback, I have disabled ufw and nginx and now messages are coming immediately like before (but no https).
So confirmed, the delay is a side effect of https/nginx config. I remember there was some comment on Chirpstack forum about API feed delay after enabling https? (can’t recall where it was exactly). Perhaps this is common for the front-end as well?

Please see this NGINX proxy example:

1 Like

Thanks brocaar,

You have pointed me in right direction.
I have replaced below lines in /etc/nginx/sites-available/default config file

Before:

WebSocket configuration
location ~ ^/api/(gateways|devices)/(\w+)/(frames|events)$ {
proxy_pass http://localhost:8080/api/$1/$2/$3;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}

After

location ^~ /api {
grpc_pass grpc://localhost:8080;
}

Restarted nginx service and now I see the lorawan frames immediately once uplink in sent from the node (before this change, messages were coming all at once with 5 min delay).
Perhaps it was due to proxy read/send timeout…not sure. Anyway, it looks ok now.

Thanks a lot