Closed HKN007 closed 5 years ago
I think you can prevent that by adding some extra configuration parameters to your NGINX configuration file (e.g. below the add_header
lines):
proxy_set_header Connection keep-alive;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
keepalive_timeout 3600;
meanwhile i came to a similar conclusion. I found in the nginx log the below error entries
about the timed out SSE connections.
Adding only the line
proxy_read_timeout 3600;
to the nginx configuration solved the problem.
Anyhow i keep your suggestion, since i'm new to nginx and likely have not seen all issues. Out of curiosity, do you have for each line a explanation why we would need it?
2019/11/08 07:23:03 [error] 598#598: *4 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.2.109, server: localhost, request: "GET /rest/sitemaps/events/bbff6b50-b65d-4a37-8bad-9e438aa393ea?sitemap=home&pageid=home HTTP/1.1", upstream: "http://127.0.0.1:8080/rest/sitemaps/events/bbff6b50-b65d-4a37-8bad-9e438aa393ea?sitemap=home&pageid=home", host: "192.168.2.55", referrer: "http://1
92.168.2.55/basicui/app"
2019/11/08 07:23:03 [error] 598#598: *1 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.2.109, server: localhost, request: "GET /rest/sitemaps/events/63c73c97-f0c9-48d1-99ec-d0d833a3ccb2?sitemap=home&pageid=0301000311 HTTP/1.1", upstream: "http://127.0.0.1:8080/rest/sitemaps/events/63c73c97-f0c9-48d1-99ec-d0d833a3ccb2?sitemap=home&pageid=0301000311", host: "192.168.2.55", referrer: "
http://192.168.2.55/static/demo.html?dashboard=openhab2_roomba&fromItem=ROOMBA_HISTORY_START_TIME&toItem=ROOMBA_HISTORY_STOP_TIME&panel=2&theme=light"
It's been a while since I've touched these values. ;-) I think I got these after searching for SSE timeout issues on the web. Using all of them could be overkill.
ok - thanks. Closed.
Hi wborn, Hi All,
after having problems with openHAB pages not reloading with parameter change, i installed a reverse proxy to solve the Same-origin policy issue. Now on IE, Chrome, Firefox and Android App, everything works fine.
The downside is that with the reverse proxy enabled, i receive approx. every minute a message in Basic UI saying "Offline: Waiting for connection".
I'm running everyhting inside a local network with openHABian on Pi3B. My versions are: openHab 2.5.0 M1 grafana 5.1.4 nginx 1.10.3
Can you please have a look on my configs below? Might be that i have missed something or you have a clever idea which can help me. I'm stuck.
Thanks a lot BR Henning
NGINX:
Grafana.ini:
openhab-grafana-user-defaults.js:
openHAB Sitemap URL:
Webview url="https://192.168.2.55/static/demo.html?dashboard=openhab2_roomba&fromItem=ROOMBA_HISTORY_START_TIME&toItem=ROOMBA_HISTORY_STOP_TIME&panel=2&theme=light&w=0301000311&sitemap=home" height=20 icon="none"