php fastcgi exp,nginx +phpfastcgi 环境下 导出excel文件,超时,数据被截断问题,解决...
nginx 错误日志显示,访问超时
2015/09/16 07:18:43 [error] 2108#0: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "http://192.168.138.199/test/index.php?m=lists.main&status=1"
2015/09/16 07:18:43 [error] 2108#0: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "http://192.168.138.199/test/index.php?m=lists.main&status=1"
2015/09/16 07:18:43 [error] 2108#0: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "http://192.168.138.199/test/index.php?m=lists.main&status=1"
2015/09/16 07:18:43 [error] 2108#0: *6 open() "/www/50x.html" failed (2: No such file or directory), client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "http://192.168.138.199/test/index.php?m=lists.main&status=1"
2015/09/16 07:18:43 [error] 2108#0: *6 open() "/www/50x.html" failed (2: No such file or directory), client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "http://192.168.138.199/test/index.php?m=lists.main&status=1"
2015/09/16 07:18:43 [error] 2108#0: *6 open() "/www/50x.html" failed (2: No such file or directory), client: 192.168.138.7, server: localhost, request: "GET /test/index.php?m=lists.export&status=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.138.199", referrer: "
修改linux 配置文件
worker_processes 1;
error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
large_client_header_buffers 4 16k;
client_max_body_size 300m;
client_body_buffer_size 128k;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /www;
proxy_read_timeout 15000;
index index.html index.htm index.php;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /www;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_read_timeout 1500;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
php fastcgi exp,nginx +phpfastcgi 环境下 导出excel文件,超时,数据被截断问题,解决...相关推荐
- 解决IE浏览器下导出Excel文件乱码和不显示的问题
乱码问题解决: 第一步:前端转码 使用js中的转码函数 encodeURI(activityName) 将接口中传入的中文字符转码 第二步后台解码: String activityName = new ...
- Linux环境下实现excel文件转pdf并且实现优化
最近公司有一个excel转pdf的需求需要实现,话不多说直接上代码! 我所用的环境是ubuntu18版本 excel转pdf在Linux环境中可以使用libreoffice插件进行转换! 1.首先查看 ...
- php alias 报错,PHP(FastCGI)在Nginx的alias下出现404错误的解决方法
本文讲述了PHP(FastCGI)在Nginx的alias下出现404错误的解决方法.分享给大家供大家参考,具体如下: 在Nginx的官方wiki中如下描述 The alias directive c ...
- .net core linux环境下导出到excel报The type initializer for ‘Gdip‘ threw an exception.异常
.net core linux环境下导出到excel报The type initializer for 'Gdip' threw an exception.异常 一.安装一下包: yum -y ins ...
- windows环境下新建.txt文件,使其默认以UTF-8编码
问题的引出: windows环境下新建.txt文件,默认以ANSI格式编码.这种格式编码的文件,放到ubuntu上很可能会乱码. 于是我就想,如何设置windows,才能使新建的.txt文件默认以UT ...
- Oracle-11g-R2 RAC 环境下 GPnP Profile 文件
GPnP Profile 文件的作用: GPnP Profile 文件是一个保存于 $GRID_HOME/gpnp/<hostname>/profiles/peer 目录下的小型 XML ...
- .Net Core通过NPOI在CentOS 7(Docker)环境中导出Excel报错The type initializer for ‘Gdip‘ 的问题
一.前言 今天在AspNetCore5.0环境中做了一个导出Excel的功能,在开发机器上(windows10)调试正常,但是部署到centos7容器(容器基础环境mcr.microsoft.com/ ...
- IBM内存分析工具JCA在windows环境下打开dump文件报错问题:Cannot find any thread dumps
问题描述:IBM内存分析工具JCA在windows环境下打开dump文件报错问题:Cannot find any thread dumps 原因:dump文件编码格式问题 解决:修改dump.txt文 ...
- Laravel 导出Excel文件保存到本地的public目录下
Laravel 导出Excel文件保存到本地的public目录下 控制器中的代码: $filename = md5($id) . '.xlsx';//store方法的第三个参数,对应的是filesys ...
最新文章
- 深度学习--TensorFlow(6)神经网络 -- 拟合线性函数非线性函数
- 5款没有专利纠葛的Linux发行版
- java如何做到判断一个字符串是否是数字
- 机器学习你必须知道的几点知识
- 深入解析windows XP/2003:内核模式和用户模式
- android canvas_Android自定义View之绘制虚线
- 突然记起我也遇到过一个麻花姐
- linux redis安装报错,Linux安装Redis实现过程及报错解决方案
- table 样式详解
- 使用JavaScript弹出Confirm对话框
- SpringCloud工作笔记046---PostMan打不开怎么解决
- ajax怎样带值,ajax携带状态值
- Linux下MySQL数据库的备份与还原
- 超实用的JavaScript技巧及最佳实践(下)
- python pip安装
- 中文停用词词表-自然语言处理
- Idea主菜单栏不见了怎么找回
- 电子书chm转换html,chm转换为html的超简单方法
- 超声波清洗机 - 拆机与逆向工程
- 从UI设计在国内的发展历程来看,UI设计发展前景如何?