nginx 软重启报错 mmap(MAP_ANON|MAP_SHARED, 524288000) failed (12: Cannot allocate memory)

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/Ruffaim/article/details/84892144

解决办法

将配置文件的 httpproxy_cache_path 由500改为300

proxy_cache_path /usr/local/nginx/proxy_cache_path levels=1:2 keys_zone=cache_one: 300m inactive=1d max_size=10g;
proxy_temp_path /usr/local/nginx/proxy_temp_path;

测试

ubuntu@VM-0-13-ubuntu:/etc/nginx$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

重启即可

sudo nginx -s reload

猜你喜欢

转载自blog.csdn.net/Ruffaim/article/details/84892144