Cached memory keeps growing
by ibrahimjaradat from LinuxQuestions.org on (#4QKTW)
hello all;
I am running a containerized application which is consist of micro-services , what I'm facing that there are a lot of those micro-services crashed after 5 hours of working and when I traced the logs the error was leak in memory, I checked the memory usage by free command then I noticed a big mount of memory is reserved as buffered/cached ,i tried to clear them by the following command but with no benefit "cached memory stayed as it was" :
sync;/sbin/sysctl vm.drop_caches=1
sync;/sbin/sysctl vm.drop_caches=2
sync;/sbin/sysctl vm.drop_caches=3
sync
please guide me how to force the kernel to free the cached memory.


I am running a containerized application which is consist of micro-services , what I'm facing that there are a lot of those micro-services crashed after 5 hours of working and when I traced the logs the error was leak in memory, I checked the memory usage by free command then I noticed a big mount of memory is reserved as buffered/cached ,i tried to clear them by the following command but with no benefit "cached memory stayed as it was" :
sync;/sbin/sysctl vm.drop_caches=1
sync;/sbin/sysctl vm.drop_caches=2
sync;/sbin/sysctl vm.drop_caches=3
sync
please guide me how to force the kernel to free the cached memory.