Home  >  Article  >  Backend Development  >  Nginx+Apache+PHP超时时间设定

Nginx+Apache+PHP超时时间设定

WBOY
WBOYOriginal
2016-06-23 13:42:06946browse

今天在做一个数据导入,超时时间一直设置不对,经过几轮查询以后,才知道需要做如下多环节的配置。

Nginx需要配置如下超时配置

 fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;

如果使用的是Nginx的代理服务,需要添加如下配置

 location / {                proxy_read_timeout      300;        }

PHP端需要修改如下配置

max_execution_time = 300max_input_time = 300

修改完成以后,全部重启一下,就完美解决了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn