deepstreamIO / deepstream.io

deepstream.io server
https://deepstreamio.github.io
MIT License
7.13k stars 382 forks source link

Explaination on Info "Heartbeat missing on websocket, terminating connection" #1095

Closed geohuz closed 3 years ago

geohuz commented 3 years ago

I noticed the message "Heartbeat missing on websocket, terminating connection" have being showed up in my server log for recent days, I would like to understand what does the message suggest for, what should I do to eliminate the message? The deepstream server version: 5.1.8, clientjs version: 5.1.10

jaime-ez commented 3 years ago

Hi, whats your server and client config regarding heartBeatInterval ?

geohuz commented 3 years ago

@jaime-ez for the server side I didn't make adjustment so I think it's the default value, I'm not sure if this setting block:

connectionEndpoints:
  - type: ws-binary
    options:
      # url path websocket connections connect to
      urlPath: /deepstream
      # the amount of milliseconds between each ping/heartbeat message
      heartbeatInterval: 30000
     ....

and I don't have a configuration option for the client side, would you mind to tech me the proper way of doing this on both side?

Thanks!


I did a quick check found the settings in source repo, so the default value of heartbeatInterval should 30000, what is the suggest value how to tune it?

jaime-ez commented 3 years ago

Ok the problem is that there is a release issue currently and we haven't been able to update the latest version on npm. The client version > 5.1.12 fixes this problem. The temporary workaround is to install the package from github and build it:

npm install https://github.com/deepstreamIO/deepstream.io-client-js#v5.1.12
cd node_modules/@deepstream/client/
npm i
npm run build

There you will have the working version 5.1.12

I'll let you know as soon as we fix the npm publishing issue.

jaime-ez commented 3 years ago

Ok just manually published version 5.1.12. Just npm install and you'll be able to use it. Please reopen if the issue persists.