从3.3升级到3.5,执行update_adult.php时,有些表出现 Gateway Timeout,有什么好办法解决? New
从3.3升级到3.5,执行update_adult.php时,不时的遇到以下提示:Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.
要不断的重复刷新网址,才能执行下去,相当费时,要怎么解决?
我看代码中有以下提示,不明白解决办法?
// 对于因数据库超时而升级失败的特大站点请看此函数
setdbglobal();
1 贡献最佳答案
在 Fedora Linux 32 系统中,使用 Apache 和 PHP-FPM 时,调整以下配置文件以解决 Gateway Timeout (504) 错误:
1. Apache: 修改 /etc/httpd/conf/httpd.conf 或 /etc/httpd/conf.d/*.conf 中的 Timeout 或 ProxyTimeout。
2. PHP-FPM: 修改 /etc/php-fpm.d/www.conf 中的 request_terminate_timeout。
3. PHP: 修改 /etc/php.ini 中的 max_execution_time。
修改后重启相关服务即可生效。
IsaacZ发表于前天 19:45
[*]详细答案 >
遇到Gateway Timeout,就要手动刷新网址,相当费时间,要手动刷上百次,要花数几小时在那里刷,才能完成过程,有没有办法改进? 直接 修改 服务器 Nginx 和php 的超时时间呢 终端执行试试
php update_adult.php 终端执行,不行吧,这是有图形界面的,有下一步的操作。
刚才试试修改 /etc/php.ini 中的
default_socket_timeout = 60
改为
default_socket_timeout = 600
并执行 systemctl restart php-fpm
好象没用,还是1分钟就操时了 一步步设置不同的step去执行好了 标签自动刷新 - Microsoft Edge Addons
https://microsoftedge.microsoft.com/addons/detail/标签自动刷新/bicjibdndeejemialpbohjpiimehbapb 要解决 Gateway Timeout (504) 错误,主要需要调整以下超时配置:
Nginx: proxy_read_timeout 或 fastcgi_read_timeout。PHP-FPM: request_terminate_timeout。PHP: max_execution_time。
不要只调整一个地方。 我在 /etc/php.ini 找到
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60
上面有 max_execution_time = 30 这个参数,你说的其他参数在哪里找?谢谢!
我用的是fedora linux 32 , apache 如有需求,可以有偿处理升级。
页:
[1]