Comments (10)
I will setup a test tomorrow.
from node-apn.
I can confirme our worker is in the air doing nothing.
All the "write" part is a bit messy, maybe check to https://github.com/AndrewBarba/apns2/blob/master/lib/http2-client.js as a replacement of client.js. To me it appears cleaner ;)
(Despite session.setTimeout steel missing)
from node-apn.
@petitchevalroux Refer to https://github.com/AndrewBarba/apns2/issues/33
- there's quite a few unaddressed review comments, and that file does call setTimeout but seems like it introduce different potential failure modes (e.g. it can be establishing multiple connections to APNs concurrently in connect(), but only use one).
You may be interested in #27 - A few unit tests of failure modes were added but I haven't tested this against the real apns servers for a prolonged period of time yet.
from node-apn.
No I haven't seen this problem but it's a great find, @trevh3 comments sound interesting.
I dove into http2 for the first time yesterday so I don't understand all. We will check #27 and potentially test its behavior next week.
At the moment we are not sure that timeout is the real problem. But from my first client.js read and this issue it's my first guess We enabled debug mode in production to see if we can have more information on the "worker in the air" effect.
Thanks for your feedback ;)
from node-apn.
I also do not understand why the problem is back now - and we have it really often. We actually have implemented an own watchdog .... waiting 10 sec and then creates a new APN Provider and continues. But we are sending packages with 100 receivers and I do not know which of them have received the notification and which not.
We will try now the new version but I think only the timeout will not solve the problem. We are already checking for others ways to send - with curl or whatever.
The version worked over month - but now it happens nearly on every message.
btw.
I posted in parse forum ( https://community.parseplatform.org/t/node-apn-problem-send-hangs/871/5 ) but cool that now issues is enabled here.
from node-apn.
We actually have implemented an own watchdog .... waiting 10 sec and then creates a new APN Provider and continues. But we are sending packages with 100 receivers and I do not know which of them have received the notification and which not.
@trx222 frequently opening and closing connections to APNs may make the problem worse - APNs may treat frequently opening and closing connections as a malfunctioning client or a denial of service and block connections from your IP address. (I forget where I read that.)
from node-apn.
You saw it in Apple's APNS documentation
Keep your connections with APNs open across multiple notifications; do not repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack. You should leave a connection open unless you know it will be idle for an extended period of time—for example, if you only send notifications to your users once a day, it is acceptable practice to use a new connection each day.
from node-apn.
Yes sure - I know this part and we only do a limited number of retrys ( 3 to 5 times ) and then we give up ... But what else should I do - I cannot completly stop sending in that case. We anyways have 30 parallel processes for sending to speed up everything - otherwise it takes to long for transmitting everything.
But The problem also happens if we have just 300 receivers sending in one process ... it makes no difference.
from node-apn.
Guys, could try with this branch? #29
It looks working better for me in my tests, but it would be good to have more feedback before merging.
from node-apn.
I think this can be closed now with the release of 4.0.0?
from node-apn.
Related Issues (20)
- Security vulnerability in node-forge HOT 1
- Location Push Service Notification Support HOT 2
- Notification successfully sent but not received HOT 6
- iOS Push Notification Error: {reason: 'TopicDisallowed'} HOT 3
- shutdown callback is not passed through from the Provider to the Client HOT 2
- Upgrade jsonwebtoken library HOT 3
- Resource leak when calling shutdown before finish writing HOT 1
- Is this project abandoned? HOT 4
- Add support for Node 18, 20 HOT 3
- Uncaught VError: Failed to generate token: secretOrPrivateKey must be an asymmetric key when using ES256 HOT 3
- Live Activity app not producing proper APS payload (events instead of event, missing dismissal-date) HOT 1
- I miss the localised subtitle properties `subtitle-loc-key` and `subtitle-loc-args` because you're using old Apple documentation HOT 1
- GOAWAY errors HOT 7
- topic missing in type ProviderOptions HOT 6
- issue with push 20k devices in one go HOT 2
- Images not working? HOT 2
- ENOENT: no such file or directory, open './voip.pem' HOT 1
- node-forge upgrade? HOT 1
- How can i use .pem file HOT 1
- aps property on Notification is being set to undefined HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-apn.