Closed
Description
Hi Guys,
I hope someone will be able to help me with this one. I spend over few days on this and I can't figure out the issue. We used RabbitMQ as our messaging queue system but now switched over to Google Pub/Sub. All the other code stayed same. We suddenly experiencing memory leak so I naturally assumed it's an issue with gcloud-node lib. See graph below:
I fully reviewed our implementation of the "gcloud-node" twice and it's following all the standard guidelines. I went down the debugging path and it seems "Rc" object is continuously growing. See attached screenshot where I'm compering Heaps snapshots 48 minutes apart:
Few notes:
- we're using pull method
- please note I'm not expert on investigating memory leaks in NodeJS. I think I'm more guessing ATM.
- we only experiencing this issue on our publisher that runs 24/7. It publishes on average around 10 events per second (very low traffic atm). It seems memory usage increases much faster. It runs on GCP.
- As you can see publisher goes above 1Gb of memory after 9h
- Server runs on NODE.js 4.2.1 (being moved to 4.4.5). I tested locally on 4.4.4. I don't think it's version related tbh.
- it seems the issue is not related to "quantity" of events pushed but it's more related to the process running time
Activity