nginx fastcgi_buffers to an upstream response is buffered to a temporary file
fastcgi_buffers 16 16k;
指定本地需要用多少和多大的缓冲区来缓冲FastCGI的应答,如上所示,如果一个php脚本所产生的页面大小为256k,则会为其分配16个16k的缓冲区来缓存,如果大于256k,增大于256k的部分会缓存到fastcgi_temp指定的路径中,当然这对服务器负载来说是不明智的方案,因为内存中处理数据速度要快于硬盘,通常这个值的设置应该选择一个你的站点中的php脚本所产生的页面大小的中间值,比如你的站点大部分脚本所产生的页面大小为256k就可以把这个值设置为16 16k,或者4 64k 或者64 4k,但很显然,后两种并不是好的设置方法,因为如果产生的页面只有32k,如果用4 64k它会分配1个64k的缓冲区去缓存,而如果使用64 4k它会分配8个4k的缓冲区去缓存,而如果使用16 16k则它会分配2个16k去缓存页面,这样看起来似乎更加合理。
//+++++++++++++++++++++++++++++++++++++++++
client_max_body_size 100m; #允许客户端请求的最大单文件字节数
client_body_buffer_size 2048k; #缓冲区代理缓冲用户端请求的最大字节数,
fastcgi_buffer_size 1024k;
fastcgi_buffers 6 256k;
fastcgi_busy_buffers_size 1024k;
fastcgi_buffer等于:fastcgi_buffer_size + the_number * is_size
fastcgi_buffers 256 4k; #设置buffer大小为:4k + 256 * 4k = 1028k
上面配置可以解决 an upstream response is buffered to a temporary file 或nginx+php-fpm慢问题
nginx fastcgi_buffers to an upstream response is buffered to a temporary file的更多相关文章
- 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 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 ...
- an upstream response is buffered to a temporary file
an upstream response is buffered to a temporary file
- [warn] 7#7: *676 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000007
nginx 上传文件遇到的Bug. fastcgi_buffer_size 128k; fastcgi_buffers 8 128k; fastcgi_busy_buffers_size 128k; ...
- Nginx Errors: upstream response cache error
Nginx Errors upstream response cache error *2470578 an upstream response is buffered to a temporary ...
- nginx buffered to a temporary 解决
今天开启了nginx的error_log,发现了三个配置问题: 问题一: 2011/07/18 17:04:37 [warn] 2422#0: *171505004 an upstream respo ...
- nginx的buffered to a temporary警告
nginx日志报a client request body is buffered to a temporary file 这个意思是客户全请求的文件超过了nginx的缓存区大小,nginx将内容写入 ...
随机推荐
- 【洛谷 P4072】 [SDOI2016]征途(斜率优化)
好久没写斜率优化板子都忘了, 硬是交了十几遍.. 推一下柿子就能得到答案为 \[m*\sum x^2-(\sum x)^2\] 后面是个定值,前面简单dp,斜率优化一下就行了. \(f[i][j]=f ...
- 2017ACM暑期多校联合训练 - Team 6 1002 HDU 6097 Mindis (数学)
题目链接 Problem Description The center coordinate of the circle C is O, the coordinate of O is (0,0) , ...
- script标签中type为<script type="text/x-template">是个啥
写过一点前端的都会碰到需要使用JS字符串拼接HTML元素然后append到页面DOM树上的情况,一般的写法都是使用+号以字符串的形式拼接,如果是短点的还好,如果很长很长的话就会拼接到令人崩溃了. 比如 ...
- 手机网页的头部meta的相关配置~~
今天使用sublime写手机端网页的时候,发现木有meta的自动生成手机网页的快捷键·~ 然后就去网上巴拉,准备存储一份~~哈哈 一.天猫 <title>天猫触屏版</title&g ...
- Linux下libevent安装与示例
http://www.cnblogs.com/kunhu/p/3632225.html
- python并发编程之multiprocessing进程(二)
python的multiprocessing模块是用来创建多进程的,下面对multiprocessing总结一下使用记录. 系列文章 python并发编程之threading线程(一) python并 ...
- puppet practice
目标 试验环境有两台主机(VM)构成,一台是master,一台是agent,完成以下工作: 新建用户newuser; 安装 ubuntu-cloud-keyring package,更改文件/etc/ ...
- [写出来才有价值系列:node.js]node.js 02-,learnyounode
安装learnyounode: npm install g learnyounode 官方说直接 但是我发现不行,很慢几乎就是死在那里了 还好有淘宝的东西给我们用https://npm.taobao. ...
- C语言实现int转换string
#include <stdio.h> #include <stdlib.h> #include <string.h> int string2int(const ch ...
- static变量和final变量
1.static变量 按照是否静态的对类成员变量进行分类可分两种:一种是被static修饰的变量,叫静态变量或类变量:另一种是没有被static修饰的变量,叫实例变量.两者的区别是: 对于静态变量在内 ...