关于LNMP+Frp内网穿透环境下一个PHP程序运行超时的问题

栏目: PHP · 发布时间: 7年前

内容简介:一直想在内网穿透的环境下运行WordPress,但是由于WordPress的一个插件一直运行超时错误的问题未解决而作罢,这次有空调试一下,看看能否解决:1.检查nginx中fastcgi(php-fpm)60s超时的问题在站点配置文件中加上fastcgi_read_timeout 600;

一直想在内网穿透的环境下运行WordPress,但是由于WordPress的一个插件一直运行超时错误的问题未解决而作罢,这次有空调试一下,看看能否解决:

1.检查nginx中fastcgi(php-fpm)60s超时的问题

在站点配置文件中加上fastcgi_read_timeout 600;

location ~ .*\.(php|php5)?$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_connect_timeout      600;

fastcgi_read_timeout 600;

fastcgi_send_timeout            600;

fastcgi_buffer_size 64k;

fastcgi_buffers 4 64k;

fastcgi_busy_buffers_size 128k;

fastcgi_index index.php;

include fastcgi.conf;

}

2.检查nginx.conf反向代理的超时配置

在http节段增加如下配置

client_header_buffer_size 32k;

large_client_header_buffers 4 64k;

client_max_body_size 8m;

keepalive_timeout 600;

client_header_timeout 600;

client_body_timeout 600;

proxy_connect_timeout 600;

proxy_send_timeout 600;

proxy_read_timeout 600;

proxy_buffer_size  16k;

proxy_buffers 4 64k;

proxy_busy_buffers_size 64k;

proxy_temp_file_write_size 64k;

3.检查php.ini相关超时配置

output_buffering = On

max_execution_time = 600

max_input_time = 600

default_socket_timeout = 600

4.检查frps.ini相关超时配置

heartbeat_timeout = 600

vhost_http_timeout = 600

5.检查frpc.ini相关超时配置

vhost_http_timeout = 600

# heartbeat_interval = 600

# heartbeat_timeout = 600

问题最终解决,考虑1、2、4、5的可能性比较大。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Distributed Systems

Distributed Systems

Sukumar Ghosh / Chapman and Hall/CRC / 2014-7-14 / USD 119.95

Distributed Systems: An Algorithmic Approach, Second Edition provides a balanced and straightforward treatment of the underlying theory and practical applications of distributed computing. As in the p......一起来看看 《Distributed Systems》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具