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将内容写入 ...
随机推荐
- 4163 hzwer与逆序对 (codevs + 权值线段树 + 求逆序对)
题目链接:http://codevs.cn/problem/4163/ 题目:
- MUI上传文件的方法
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...
- Django之cfrs跨站请求伪造和xfs攻击
跨站请求伪造 一.简介 django为用户实现防止跨站请求伪造的功能,通过中间件 django.middleware.csrf.CsrfViewMiddleware 来完成.而对于django中设置防 ...
- python批量替换文件名
替换关键字 #-*-coding:utf-8-*- import os import re filepath = u'E:\\CMMI4\\07_测试文档' files = os.walk(filep ...
- 当while read line 遇到 ssh
问题:while read line 中使用ssh只能读取一行? #!/bin/sh while read line do echo $line ssh root@$line "echo 1 ...
- leetcode Two Sum II - Input array is sorted <面试常考题>
题目描述 //二分查找的变形 用头尾两个指针进行 面试考察题 class Solution { public: vector<int> twoSum(vector<int> ...
- apache 软件历史版本查询
http://archive.apache.org/dist/ http://archive.apache.org/dist/struts/binaries/
- PostGreSQL数据库安装配置说明
windows 10 x64 pro 1703安装postgresql-9.6.3-2-windows-x64.exe数据库,步骤如下: 第一:下载数据库安装程序,下载地址为:https://www. ...
- 【hdoj_1753】大明A+B(大数)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1753 本题要求是,进行多位的小数加法,由于位数很多,所以不能用double类型存储,可以用字符串存储,然后 ...
- [Vuejs+php] MySQL数据转JSON传值到前端
说在前面 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. 优点如下[转]: 1.占带宽小(格式是压缩的) 2. js通过eval()进行Json读取(便 ...