Answer a question

I have tried enabling Nginx caching in my Elastic Beanstalk application. For this matter I've added the following lines in my Nginx configuration file -

proxy_cache_path /tmp levels=1:2 keys_zone=analytics-cache:50m max_size=1g inactive=5m use_temp_path=off;
proxy_cache           analytics-cache;

The problem is that once I start up Nginx I get the following error in the error.log - cache file "/tmp/restore_docker_image_names.sh" is too small.

I have no idea what this error means, and it persisted even after trying to increase the size of my cache key from 5m to 50m. How can I avoid this error?

Answers

The fact that nginx is trying to open a .sh file for it's cache looks suspicious. /tmp is used by the whole system so non cache files already exist there.

Use a proxy_cache_path that is empty and only nginx will use, like /tmp/nginx/cache or /var/cache/nginx

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐