nchan
nchan copied to clipboard
Client keeps making requests rather than waiting for activity
Doubtless this is my fault in some way, but I could use some help.
Here's my config:
server {
listen 555 ssl;
server_name ...removed;
# SSL settings
...removed
location = /subscribe {
nchan_subscriber;
nchan_channel_id $arg_id;
}
location = /publish {
nchan_publisher;
nchan_channel_id $arg_id;
}
location /nchan_stub_status {
nchan_stub_status;
}
}
I'm using the nchan NPM client. About every second, I can see that a request is being made to my channel, which returns with 101 Switching protocols.
Why would this be happening so frequently?
If I connect using a browser then I rapidly get ERR_EMPTY_RESPONSE errors.
Adding an 'on' handler for errors I see lots of errors saying "Error during WebSocket handshake: net::ERR_CONNECTION_RESET" or "Error during WebSocket handshake: Unexpected response code: 507". But these are not once per second.
Much less frequently, I see it return storage errors; I'm not worried about this as I have a periodic restart but I mention it in case it's relevant.
Anyone seen this?
I haven't seen this issue before. Is there anything odd in the Nginx error log?
Thanks for your reply. I get this log repeatedly
2019/12/22 20:28:38 [alert] 14783#0: *6237902 header already sent while keepalive, client: 185.201.34.38, server: 0.0.0.0:555
2019/12/22 20:28:39 [alert] 14791#0: *6238003 header already sent while keepalive, client: 185.201.34.38, server: 0.0.0.0:555
2019/12/22 20:28:39 [alert] 14793#0: *6238018 header already sent while keepalive, client: 185.201.34.38, server: 0.0.0.0:555
2019/12/22 20:28:40 [alert] 14805#0: *6238127 header already sent while keepalive, client: 185.201.34.38, server: 0.0.0.0:555