To clear the cache that may consume the memory, try create a executable script with this value:
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
And configure this to run every hour to clear the cache. This will help to reduce the out of memory issue in unix.