oortcloud / node-ddp-client

A callback style DDP (Meteor's Distributed Data Protocol) node client.
Other
263 stars 80 forks source link

DDP Connection Idle Disconnect #80

Closed mayvn10 closed 8 years ago

mayvn10 commented 8 years ago

Everything connects fine after viewing #79 until what seems like a Connection Idle Disconnect.

Currently using it in a node project hosted on DO in connection with a meteor app hosted on Galaxy but it seems like if the connection is idle and there are no processes happening, it will disconnect.

We have reconnect measures in place but it continues to disconnect anyway. Are there more ways to keep a sustained connection?

vsivsi commented 8 years ago

Do you know which side is disconnecting? Is it the Galaxy / Server-side that is initiating the disconnect? If so, that's a Galaxy question. This package generates events on disconnect that you can hook to automatically reconnect. That's why I recommended looking at the node.js worker sample code, as it contains some logic along those lines. https://github.com/vsivsi/meteor-job-collection-playground-worker

vsivsi commented 8 years ago

Just noticed your comment on the other issue that you already looked at the playground worker...

mayvn10 commented 8 years ago

@vsivsi After careful monitoring, it looks like this isn't a node-ddp-client issue, but a Meteor Job Collection Issue. I'll file a question there and explain it further but basically I added an undefined catch that was needed (relative to our project) and the connection was sustained, however, after X amount of runs the job continues to stay running. Please check the meteor job collection package issue boards.