-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push notifications silently fail until a new PushManager is created #109
Comments
@steve-taylor How long is "a while?" Could you please set our logging level to Thanks! |
@jchambers How do I set the logging level in pushy? |
Since I am running on GlassFish 4 and SLF4J and GlassFish 4 don't work together without manually copying jars and hacking XML files, I simply cannot enable pushy logging. It is completely pointless to abstract away choice of logging framework when you could simply just choose one and it will work. |
I might actually have encountered at least a similar issue while debugging sometimes missed push notifications. We're using pushy 0.3 at the moment. Logging at trace level shows the following behaviour: Everything is running smoothly and when encountering an invalid token, the connection is dropped, re-established and restarted:
This goes on for a while, until one of the restarts seem to encounter an issue and does not properly restart anymore:
although Apple already rejected a notification, pushy seems to continue writing in the (probably broken) connection, this goes on for quite a while:
at this point the successful writes and unprocessed notifications messages stop as well, notifications are further sent though (probably until a buffer is filled):
at which point pushy just waits. There is no issue (exception etc.), sending further notifications to the push manager though (from the API side). Another log shows, that this actually has some kind of timeout as well. After 16 minutes and 10 seconds the process seems to advance again, noticing an (unlogged) exception and restarting. Of course notifications are up to 15 minutes too late this way, of course:
I'll try if the current master branch is working better, but this issue actually seems to come up quite often after a few thousand messages (current logfile for example after 12 reconnects). Maybe this does help for now. About the environment: this is a linux machine running a WebObjects application combined with Akka Actors and Pushy. Greetings Edit: on a previous own-code-implementation of push notifications we encountered somewhat similar issues, where connections would hang up to 15 minutes waiting for a timeout. In those cases the TCP send buffer seemed to be full and no timeout mechanism was in use for TCP sending. Edit^2: While the newest dev version did not help, it seems that I could reduce the impact by introducing a WriteTimeoutHandler into the handler chain (although more of a quickfix right now). |
By all appearances, this is another case of having no way of knowing if a connection is alive or not. We have changes in the works (a write timeout being one of them) that will mitigate the situation, but won't actually introduce any new delivery guarantees. I'm afraid this is an inherent design issue with the APNs protocol. I'll leave this open until we've actually implemented those changes. |
I'm creating a
PushManager
inside a singleton EJB:After a while, push notifications just stop working. There is not feedback and no exceptions being logged. After I reboot the server, push notifications start being processed again. Am I doing something wrong in the above code?
The text was updated successfully, but these errors were encountered: