Nginx Errors: upstream response cache error
Nginx Errors
upstream response cache error
*2470578 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/6/10/0000010106 while reading upstream
To fix
vim /etc/nginx/nginx.conf
# in http part of nginx.conf
proxy_buffer_size 512k;
proxy_buffers 8 512k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
client request body cache error
*2445185 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000010019
To fix
## in http part of nginx.conf
client_max_body_size 5M;
client_body_buffer_size 1M;
client send too large body size error (nginx 413
)
*1245147 client intended to send too large body: 15152741 bytes
To fix
## in server location part
client_max_body_size 30M;
PHP fastcgi cache error
*2502029 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/3/11/0000010113 while reading upstream
To fix
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
PHP fastcgi path_info error
*1280448 using uninitialized "path_info" variable
To fix
## refer to https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#
## fastcgi_param
## vim /etc/nginx/fastcgi_param
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name; fastcgi_param HTTPS $https; # PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200; ## vim /etc/nginx/conf.d/server1.conf
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
} fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
[emerg] could not build the server_names_hash...
开始使用nginx只有一个虚拟主机,默认server_name 会使用 localhost, 今天配置nginx的server_name是一个正式存在的域名的时候,报错如下:
root@pts/0 $ nginx -t
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
nginx: configuration file /etc/nginx/nginx.conf test failed
How to fix
在nginx的配置文件nginx.conf的http段添加如下配置:
# vi /etc/nginx/nginx.conf
...
http {
...
server_names_hash_max_size 512;
server_names_hash_bucket_size 128;
...
}
... root@pts/0 $ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
nginx官方对server_name
的说明请参考 链接
实例配置:
cat /etc/nginx/nginx.conf
client_max_body_size 100M;
client_body_buffer_size 128k;
proxy_buffers 8 512k;
proxy_buffer_size 512k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
Nginx Errors: upstream response cache error的更多相关文章
- Nginx an upstream response is buffered to a temporary file
1.错误日志:warn:an upstream response is buffered to a temporary file 解决办法:增加fastcgi_buffers 8 4K; fa ...
- Nginx an upstream response is buffered to a temporary file,nginx502错误
1.错误日志:warn:an upstream response is buffered to a temporary file 解决办法:增加fastcgi_buffers 8 4K; fa ...
- nginx warn an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/ while reading upstream
最近管理的nginx发现大量的error log,log内容如下: an upstream response is buffered to a temporary file /var/cache/ng ...
- nginx之proxy、cache、upstream模块学习
nginx之proxy反向代理模块: location ^~ /proxy_path/ { root "/www/html"; 这里没必要配置 index index.html; ...
- Nginx warn:an upstream response is buffered to a temporary file
我通过nginx下载文件,error.log中出现如下警告日志:warn:an upstream response is buffered to a temporary file . 虽然网上各种例 ...
- nginx fastcgi_buffers to an upstream response is buffered to a temporary file
fastcgi_buffers 16 16k; 指定本地需要用多少和多大的缓冲区来缓冲FastCGI的应答,如上所示,如果一个php脚本所产生的页面大小为256k,则会为其分配16个16k的缓冲区来缓 ...
- 7、nginx的upstream及fastcgi模块应用
ngx_http_proxy_module, ngx_http_upstream_module ngx_http_proxy_module:实现反向代理及缓存功能 proxy_pass http: ...
- nginx的upstream目前支持5种方式的分配
Nginx nginx的upstream目前支持5种方式的分配 FROM: 转载 1 轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器, 如果后端服务器down掉, 能自动剔除. 2 w ...
- 记录一次nginx的upstream的配置信息
nginx的upstream的配置信息 upstream qq.xiaoyu.cn { server 192.168.1.139:80 max_fails=3 fail_timeout=30s; se ...
随机推荐
- 获取apk的appPackage和appActivity方法
aapt dump badging +客户端包所在路径+客户端包名称; aapt是SDK\tools侠的工具: adb shell logcat | grep cmp= 将 ...
- 2017中国大学生程序设计竞赛 - 女生专场C【前后缀GCD】
C HDU - 6025 [题意]:去除数列中的一个数字,使去除后的数列中所有数字的gcd尽可能大. [分析]: 数组prefixgcd[],对于prefixgcd[i]=g,g为a[0]-a[i]的 ...
- HDU1213 How Many Tables (并查集)
题目大意: 有一个人要过生日了,请他的朋友来吃饭,但是他的朋友互相认识的才能坐在一起,朋友的编号从1 ~ n,输入的两个数代表着这两个人互相认识(如果1和2认识,2和3认识,那么1和3也就认识了).问 ...
- floyed算法的一些感想
for(int k=1;k<=n;k++) for(int i=1;i<=n;i++) for(int j=1;j<=k;j++) if(f[i][k]+f[k][j]<f[i ...
- 单调队列练习题(oj p1157 p1158 p1159)
p1157是很气人的...自从评测机挂了后,速度就特别慢,cin已经过不了了,然而我不知道,就各种**的提交 惨兮兮惨兮兮,这还是开了小号(通过率堪忧.jpg...)... 思路就是单调队列维护,用队 ...
- binlog监听工具-canal
官网 https://github.com/alibaba/canal/wiki
- 网络采集软件核心技术剖析系列(4)---使用C#语言如何将html网页转换成pdf(html2pdf)
一 本系列随笔概览及产生的背景 本系列开篇受到大家的热烈欢迎,这对博主是莫大的鼓励,此为本系列第四篇,希望大家继续支持,为我继续写作提供动力. 自己开发的豆约翰博客备份专家软件工具问世3年多以来,深受 ...
- Inno Setup 注册表启动项 修改注册表
//注册表启动项 [Registry] Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ...
- RabbitMQ,Apache的ActiveMQ,阿里RocketMQ,Kafka,ZeroMQ,MetaMQ,Redis也可实现消息队列,RabbitMQ的应用场景以及基本原理介绍,RabbitMQ基础知识详解,RabbitMQ布曙
消息队列及常见消息队列介绍 2017-10-10 09:35操作系统/客户端/人脸识别 一.消息队列(MQ)概述 消息队列(Message Queue),是分布式系统中重要的组件,其通用的使用场景可以 ...
- ZOJ 3792 Romantic Value 最小割(最小费用下最小边数)
求最小割及最小花费 把边权c = c*10000+1 然后跑一个最小割,则flow / 10000就是费用 flow%10000就是边数. 且是边数最少的情况.. #include<stdio. ...