After some idle time user just loose connection

I have deployed my app and testing it now. I have noticed that sometimes after user is idle for some time and comes back everything stops working (no subscriptions working and no collections loading). After browser refresh it’s fine again. Looks like its connection is lost. Is there any timeout on it? Anyone had similar problem?

Could you add some more details like version, packages used and configuration? Also: how long after idle does that happen? And: is the browser still active?

Newest version, has quite few packages but mostly standard ones. I don’t know exact time but would would be something like ~ 20-60 min. Classic meteor, blaze, Tracker no imports. Symptoms like client lost connection and didn’t reconnect. Cannot reproduce reliably.

I have seen a similar problem. It doesn’t seem to be an issue that Meteor really cares about but it creates a really bad user experience for us. Imagine this, a user is working on something, they leave the app to do something else like go to lunch, they come back and open up their laptop and take actions that call meteor.methods from the client and none of that registers to the server.

When this is happening you’ll notice that the app is basically "disconnected’ but Meteor.status().connected = true (which is misleading).

You can’t really reproduce this easily in a localhost environment but it’s very, very, easy to do on anything deployed on the web and you don’t have to wait a long time. You can simulate the same issue by switching to a different wifi network, and you’ll see that the app does not complete any meteor.methods.

One solution I’ve tried to this (but it’s expensive) is to create a meteor.method called “ping” that returns nothing but a string called “pong”. I run this on an interval in my client side code, when more than a few seconds elapses, I call Meteor.disconnect() and Meteor.reconnect().