4

PHP 请求超时,不晓得具体是哪里的配置?

 3 years ago
source link: https://www.v2ex.com/t/793657
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  PHP

PHP 请求超时,不晓得具体是哪里的配置?

  s609926202 · 16 小时 58 分钟前 · 916 次点击
每一条 post 请求都是在 10s 时中断,后台返回 502 Bad Gateway 。然后响应头显示 keep-alive: timeout 4

但是,在 php.ini 的 max_execution_time: 300,以及 php-fpm.conf 中的 request_terminate_timeout: 0 均已配置,同时也没有报错日志。

按理,服务器应该不会有 10s 的限制,数据库( mysql )更不会有。。

所以是哪里的配置。。好生奇怪。

第 1 条附言  ·  46 分钟前

贴一下具体配置(超时部分的)。

Nginx:

http {
    keepalive_timeout 600;
    tcp_nodelay on;

    fastcgi_connect_timeout 600;
    fastcgi_send_timeout 600;
    fastcgi_read_timeout 600;
}
max_execution_time = 600
max_input_time = 60
memory_limit = 512M

PHP-FPM:

request_terminate_timeout = 0
request_slowlog_timeout = 0
slowlog = /var/log/slow.log

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK