How to clear Server cache in EC2

-1

Our site is showing site can't be reached. When I've checked the disk space and its showing its full and the cache has added to it. May I know how to clear that cache.

Post
asked a year ago785 views
2 Answers
0

Best way is to schedule cronjob to clean up the cache. Below cronjob commands are to clear the server cache every hour. Please change it according to your needs.

1 * * * * sync; echo 3 > /proc/sys/vm/drop_caches 1 * * * * sync; echo 2 > /proc/sys/vm/drop_caches 1 * * * * sync; echo 1 > /proc/sys/vm/drop_caches

profile pictureAWS
answered a year ago
  • Doesn't this just drop disk cache out of memory? @Post is having trouble with free disk not free memory. Seems to me that "server cache" in the question isn't talking about the Linux disk cache. Cheers.

0

You've mentioned a server cache in EC2 but added "Amazon File Cache" as a tag - are you actually using this? https://aws.amazon.com/filecache/faqs/.

If it's a server cache on EC2, wht are you caching and what are you using to perform the caching?

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions