There are some caches inside Parse Server that may be resulting in a larger memory consumption. It can be also something related to your cloud code or any module you have installed. And, of course, it can also be a memory leak at Parse Server that we would need to investigate.
You may also want to trace your app with an agent like New Relic to potentially pin down a memory leak. It could be something as simple as a promise in your Cloud Code that is never resolved.
Do you think if I setup a redis cache, this can be resolved? I’ve read that internal caching system has memory leaks. If It doesnt solve the issue, then I will trace memory leaks with new relic.
Also I dont think I have an unresolved promise. My code either resolves or throws error. But I will look at that again.
The memory can be increasing for many different reasons and depending on the reason the redis cache can help. I’d first try to understand why it is happening.
I tried redis cache. When using redis, memory usage never went higher than 400Mb per instance. And when job done(query or cloud code) memory immediatly released. But when using parse internal cache system, memory goes high(like 800Mb or even 1gb) and its keeping that as long as there is more memory to use. But It still releases memory when new cloud code or query executed. It drops 500Mb from 800Mb etc. So Internal cache system doesnt release objects when idling. But free up memory eventually.