I have few Ubuntu server have memory problem and sometime MySQL get down so I decided to clear cached memory using this code sync; sudo echo 3 > /proc/sys/vm/drop_caches I have added an hourly cron job for running this code but I am confused, is this a good practice for memory issue? I need experts opinion.
I don't know about hourly, but it's not a bad idea to do it once in awhile. Personally, I have a cron job that does it weekly. But it's also on servers with 256GB of RAM, so not exactly tight on memory.