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将内容写入 ...
随机推荐
- centOS7 vsftp ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS) 启动失败问题?
[root@localhost c]# systemctl status vsftpd.service ● vsftpd.service - Vsftpd ftp daemon Loaded: loa ...
- SaltStack 使用笔记
centos 7安装yum -y install epel-releaseyum clean allyum makecacheyum -y install salt-minionsed -i 's/# ...
- LOW逼三人组(一)----冒泡算法
排序 1.冒泡排序 冒泡算法 import random # 随机模块 def bubble_sort(li): ###################################冒泡排序#### ...
- bzoj 3123 可持久化线段树启发式合并
首先没有连边的操作的时候,我们可以用可持久化线段树来维护这棵树的信息,建立权值可持久化线段树,那么每个点继承父节点的线段树,当询问为x,y的时候我们可以询问rot[x]+rot[y]-rot[lca( ...
- JS设计模式——5.单体模式(用了这么久,竟全然不知!)
单体模式的优势 用了这么久的单体模式,竟全然不知!用它具体有哪些好处呢? 1.可以用它来划分命名空间(这个就是就是经常用的了) 2.利用分支技术来封装浏览器之间的差异(这个还真没用过,挺新鲜) 3.借 ...
- WordPress的SEO插件——WordPress SEO by yoast安装及使用
插件:WordPress SEO by yoast 使用方法: 做好网站SEO一直是站长们的愿望,说简单也简单,但是说难也难,因为需要注意的地方太多,一个不小心被百度K了你都不知道怎么回事.这里和大家 ...
- 细说show slave status参数详解(最全)【转】
在搭建好mysql主从之后,我们一般在从库上通过命令 show slave status\G 来查看主从的状态,会有很多的参数,接下来笔者就带大家好好的了解这些参数 root@localhost (n ...
- elk系列2之multiline模块的使用【转】
preface 上回说道了elk的安装以及kibana的简单搜索语法,还有logstash的input,output的语法,但是我们在使用中发现了一个问题,我们知道,elk是每一行为一个事件,像Jav ...
- curl基于URL的文件传输工具
简介 cURL是一款开源的基于URL的文件传输工具,支持HTTP.HTTPS.FTP等协议,支持POST.cookie.认证.扩展头部.限速等特性. curl命令用途广泛,比如下载.发送http请求. ...
- final修饰的变量是引用不能改变还是引用的对象不能改变
我们都知道final修饰变量时 会变为常量,但是使 用final关键字修饰一个变量时,是引用不能变,还是引用的对象不能变? 下面让我们来看这段代码: /** * 验证final修饰的变量是引用不能变, ...