-
Notifications
You must be signed in to change notification settings - Fork 335
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
apns2 occasionally doesn't send any requests to apple #17
Comments
Hey @chimpmaster72 , Are you able to share more information about your setup.
For debugging purposes you can set the GODEBUG environment variable as follows, before you run your code, which will log out the http2 communications;
|
Thank you for the quick response!
This code sends the push to a go routine that really sends the request:
This is that go routine that really sends the request:
|
Cool thanks for the info. This is definitely strange. I have tried to reproduce here by adding extremely long delays to the time between pushes and by killing the underlying internet connection but can't yet reproduce. Any logging info that you can get from GODEBUG and paste here may help us get to the bottom of it. Also, the following will set a timeout on the HTTPClient;
|
Thanks! This issue has only happened twice. I'll continue to try to reproduce it (without the timeout). |
I just managed to reproduce this twice in my development environment. The go version, environment variables and my apns2 executable are the same as in my production environment. The main difference is that it connects to the dev apple apns2 service.
During all 3 runs of the executable this was exported Interestingly during the first 2 runs not a single line of go's http2 debug logging was printed. I don't know if there is any evidence to support this, but my gut wants to think that there may be some initialization race condition. |
To add to this, I'm seeing the exact same intermittent behavior. I've also discovered that setting the timeout on the |
@chimpmaster72 do you mind if i close this in favour of #20 as this now has slightly more information and they seem to be the same issue. |
Closed in favour of #20 which has more details |
I have a daemon process that just forwards push notifications to apple using apns2.
A handful of times when the process has started no push notifications were sent to apple. Restarting the apns2 daemon process fixes this. The contents of the apns2 successful and unsuccessful requests are exactly the same.
During the time when delivery of these push notifications failed the devices receive other push notifications. Also during this time the devices are able to directly communicate with the host that the apns2 daemon is running on.
Is there any way to enable detailed trace logging of apns2's http2 communications? For example, was it able to tcp connect, negotiate ssl, or actually send the http request?
Is there any way to enable timeouts of its requests or connection attempts?
The text was updated successfully, but these errors were encountered: