Hi! > I just escalated this bug to the Channel engineering team. >
Very glad to hear this, thanks! > > > > - Sometimes channels are just dead > > You create a channel, there are no errors or anything, but no matter how > > many messages you send, it just won't receive any. The token is still > valid, > > so your client can try to reconnect, but it won't help, it has to create > a > > new channel with a new token. But how to detect this kind of issue until > it > > is too late and user has left your app for good? The problem is > sometimes > > channel takes 20+ seconds before it receives messages.. > > > Is it similar to > http://code.google.com/p/googleappengine/issues/detail?id=7239 ? > If yes, can you comment with more details about your application > (appids, logs, etc). > Actually it is. I remember when I posted that bug it was a bad day for Channel API and it lasted for a day or two. I still see it, but only in the google analytics stats I gather, I'm not able to reproduce it myself, but it seems to happen to at least 1.5% of our users. When client is connected, there is a handshake message sent to it, if it doesn't receive it in 10 seconds, it is repeated and then again. If client doesn't receive any messages in 60 seconds, the channel is considered dead and new one is created (this event is then logged in analytics). Obviously many users are not waiting for so long, so 1.5% is an optimistic estimate. In such cases clients do not get onError() or onClose() callbacks, because those would trigger reconnection which doesn't happen. Both client and server see the channel as connected (client has socket opened and server got connected presence), sendMessage() is silent as well, so I can not really give you any logs. I understand that this doesn't allow you to reproduce this bug, I really wish I could give more precise information. > > > +1 for presence notifications are extremely unreliable > > To a degree that I had to duplicate them, my app sends its own > callbacks. > > What is unreliable you may ask? Disconnect notification for example may > come > > *minutes* after. So my client already handled the situation and > connected to > > another channel long ago. If I would have waited for presence > notification, > > I would have lost the user. Or even worse on some days the notification > may > > not come at all. > > And because you can never be totally sure that you have not missed > something > > or channel doesn't give you a new trick, I had to add shamefull lazy > polling > > to make sure my users are still connected :( > > Is it similar to > http://code.google.com/p/googleappengine/issues/detail?id=5975 or > something else? > Hmm not sure. Consider the following use case: client connects to a channel, some time later he goes offline and comes back, client sees that the token is still valid and reconnects, so far so good. Now on the server I'm tracking the list of connected users. Obviously what I expect is a connected presence, then when user goes offline - disconnected and finally when he is reconnected - connected again. In practice it could easily be connected, again connected and then disconnected. When that disconnected presence comes I have no way of knowing if this one is the missing between 2 previous connected presences or this one is fresh and the missing one is still coming. Maybe add some kind of counter that would be increased with each presence? cheers, Aleksei -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/7eWTcLqJxWsJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
