I run NGINX in front of Vaadin 23 Spring Boot application. From time to time the web application becomes unresponsive. In the browser console, I see the following 501 error:
GET wss://example.com/?v-r=push&v-uiId=6&v-pushId=bc1ba5ed-b57c-48eb-ae1d-beba3104d29e&X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=3.1.2-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json; charset=UTF-8&X-atmo-protocol=true
What might be causing this?
UPDATED
NGINX config:
server {
root /var/www/html/domain.com;
index index.html index.htm index.nginx-debian.html;
server_name domain.com;
sendfile on;
tcp_nodelay on;
tcp_nopush on;
etag off;
if_modified_since off;
# proxy_buffering off;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_cache off;
proxy_cache_convert_head off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_pass_request_body on;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
reset_timedout_connection on;
proxy_redirect off;
resolver 77.88.8.8 77.88.8.1 8.8.8.8 8.8.4.4 valid=1d;
gzip off;
gzip_proxied off;
location / {
include /etc/nginx/snippets/cors.conf;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location /api {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /api;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}
UPDATED
I added the following:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_read_timeout 3600;
proxy_connect_timeout 600;
to the location /
section but still ran into the following issue: Vaadin23 Uncaught (in promise) Error: Client is resynchronizing