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
preguntada hace un año870 visualizaciones
2 Respuestas
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
respondido hace un año
  • 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?

EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas