logicalparadox / apnagent

Node.js adapter for Apple Push Notification (APN) Service.
http://logicalparadox.github.io/apnagent
216 stars 38 forks source link

Consistent memory leaks #16

Closed bloudermilk closed 10 years ago

bloudermilk commented 10 years ago

I'm seeing consistent memory leaks in our apnagent process. We're running two clusters of 4 express servers / apnagents and after a few hours they both exceed Heroku's memory cap of 512 MB. I can confirm that during the same period, the cache and queues are staying around the same size. I'm running with a 30s cache ttl.

screen shot 2014-08-08 at 12 13 46 pm screen shot 2014-08-08 at 12 13 53 pm

I'm fairly confident that the leak isn't in our application code, since it's really a dead-simple express app that only interacts with apnagent. That said, I'm hoping to reproduce and trace the leak on my dev machine soon.

timcosta commented 10 years ago

yeah, this leak murdered my workers last night. i'll be moving to node-apn until this is sorted out.

logicalparadox commented 10 years ago

New release is up which had some outstanding PRs merged that might have dealt with this. If you could try it out and see and let me know how I goes, I would greatly appreciate it. Thanks.

timcosta commented 10 years ago

My RAM usage seems to have normalized using the new release. I'll let you know if anything changes.

bloudermilk commented 10 years ago

Not seeing any leaks as of 1.1.3

logicalparadox commented 10 years ago

Fantastic, thanks for the update.

bloudermilk commented 10 years ago

@logicalparadox no problem. I'm running 1.1.3 now so I'll try to close out old issues if they don't crop up again.