Description
Using the javascript wrapper to request the validator info data from every node in a network seems to leak memory. We saw this behavior consistently in our backend service over several weeks now.
To pin down the problem, we stripped down our backend service to a very minimal version and pushed it here: https://github.com/jens-mp/indy-network-monitor/blob/main/backend/src/server.ts. Essentially it's an endless loop which creates a new GetValidatorInfoAction, signs it and sends it to the network every 60 seconds. Additionally memory statistics are printed.
The program ran for about 10 days and during this period the heap usage of node was always below 8 megabyte. So the used up memory should not be within the javascript land. But the memory used by the process (rss) increased constantly up to around 1 gigabyte. Per request to the network the response size is around 102 kilobyte and the rss increases per request by around 110 kilobyte (on average over 9 days). This might be a hint, that the response data is still present in the wrapper or the rust library.