upstream prematurely closed connection while reading response header from upstream #835
-
I upgraded uWebSockets.js from v20.10.0 to v.20.15.0 and the errors started. So, I did the downgrade to v.20.14.0 and the problem was solved. Log error (nginx)
Nginx (proxy config)location /v1/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 300s;
proxy_connect_timeout 120s;
proxy_pass http://127.0.0.1:30061/;
# Logs
access_log /var/log/nginx/app_access.log;
error_log /var/log/nginx/app_error.log;
}``` |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Can you send a wireshark capture or similar of the actual request sent to uws |
Beta Was this translation helpful? Give feedback.
-
The most likely problem is you're sending headers that aren't hyphen or alphanumeric, or you're not sending http1.1 upstream. But I cannot do anything with this information, it tells me literally nothing. |
Beta Was this translation helpful? Give feedback.
-
In case anybody else is facing this issue, I solved it by adding |
Beta Was this translation helpful? Give feedback.
In case anybody else is facing this issue, I solved it by adding
proxy_http_version 1.1;
in thelocation
block.