Hey guys, looking for some advice. I have long running nim server that reads ton of JSON and runs some python scripts some times. Nim server usually only uses 100mb, but some time it jumps to 15GB due to the ton of JSON I am reading. Usually I am done with the JSON quickly and used memory goes back to 100mb but occupied memory stays at 15GB. Occupied memory stays with the process and does not get returned to the OS. So when I run some python scripts I get out of memory.
Simple solution is to just restart my servers when memory > 15GB. But it feels kind of unclean. Another solution is to hack around nim's gc to give back free memory to the os, so that some python scripts could use it. Reading 15GB of json is a rare event, but it does happen which takes down my system. What would you do?
