-
Notifications
You must be signed in to change notification settings - Fork 123
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
Shut down APN client on send completion - fix memory leak #55
Conversation
any idea when this will be merged? |
Bumping @appfeel |
Please merge it @appfeel |
To create a new connection per each push notification message it's not a good practice (see: https://goo.gl/gi3gud), connections between the Provider and APNS need to be persistent; if you have a scenario in which multiple push notifications are created (along with network connections) in a short period of time, the resulting amount of connections could be interpreted by Apple as a DDoS attack. Does it make sense?. Thanks! |
@c0d3m3nt0r Agree, although this pull request does not change that - currently, a new connection is already made per push message, it is just not closed after it's been sent. I guess we (as well as others on this thread) send enough pushes that our server process alerts on memory usage, but not enough for Apple to consider the number of connections opened a problem. If you're working with higher volumes I suspect you're better off using the underlying As an aside, I've got this pull request published as a scoped package, in case this helps anyone while it's not yet merged into the mainline:
|
Bumping @appfeel |
@miqmago Please merge |
Server goes nuts, @appfeel please merge. |
Probably related: #47 , #44
Reopen of #54 from a different branch of the fork
The below graph is memory usage of our application, before and after applying this patch