Open AdamSlack opened 6 years ago
fixed, doing it a search term at a time now. donezo.
Promises not releasing memory. What is life.
incredible
potentially narrowed down to two things.
One: However i'm going over all search terms in the DB is leading to there being one massive long promise chain that mean the GC can't do its job. I've tried doing it a couple of ways now. each of them lead to mem leak.
Two: The promises aren't actually the issue and its the db.js causing the issues. the pooling for postgres client connections might not be releasing properly when complete. I think its more likely to be One though.
Retriever fetches over 500k search terms and then collects 120 sets of app data for each search term. JS then ran out of memory. Rip.