Welcome! Log In Create A New Profile

Advanced

Nginx Websocket proxy dropping frames

April 24, 2014 05:29PM
Connecting to my websocket server directly works (Chrome or Firefox). Connecting via the Nginx websocket proxy connects, but drops frames. Here is an example of the JSON messages:

<-- {"login" : { "username": "user", "password" : "pass"}}
--> {"loginReply" : { "state": "ok"}}
<-- {"someSetting1" : { "something": "something"}}
<-- {"someSetting2" : { "something": "something"}} **DROPPED**
<-- {"someSetting3" : { "something": "something"}} **DROPPED**

Those last three messages are sent immediately after login, but the last two don't make it to the websocket server (~90% of the time). Subsequent messages, work fine, as if nothing was missing.

I have tried Nginx 1.4.7, 1.5.13 & 1.6

location /websocket {
proxy_pass http://localhost:8001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}

I have tried proxy_buffering off and on.

Anything else I should try?

The problem occurs ~30% of the time on my powerful x86 machine, and ~90% on my two less powerful ARM machines (one is a Raspberry Pi, and the other a much faster dual core).
Subject Author Posted

Nginx Websocket proxy dropping frames

FlappySocks April 24, 2014 05:29PM

Re: Nginx Websocket proxy dropping frames

B.R. April 24, 2014 06:14PM

Re: Nginx Websocket proxy dropping frames

FlappySocks April 25, 2014 10:35PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 81
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready