久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區

標題: 從3.3升級到3.5,執行update_adult.php時,有些表出現 Gateway Timeout,有什么好辦法解決? [打印本頁]

作者: iwuyou    時間: 2025-1-15 13:31
標題: 從3.3升級到3.5,執行update_adult.php時,有些表出現 Gateway Timeout,有什么好辦法解決?
從3.3升級到3.5,執行update_adult.php時,不時的遇到以下提示:


Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.
要不斷的重復刷新網址,才能執行下去,相當費時,要怎么解決?               

我看代碼中有以下提示,不明白解決辦法?

// 對于因數據庫超時而升級失敗的特大站點請看此函數
setdbglobal();


作者: iwuyou    時間: 2025-1-15 13:38
遇到Gateway Timeout,就要手動刷新網址,相當費時間,要手動刷上百次,要花數幾小時在那里刷,才能完成過程,有沒有辦法改進?
作者: 天外飄仙    時間: 2025-1-15 13:40
直接 修改 服務器 Nginx 和php 的超時時間呢
作者: 科站網    時間: 2025-1-15 14:09
終端執行試試
  1. php update_adult.php
復制代碼

作者: iwuyou    時間: 2025-1-15 14:37
科站網 發表于 2025-1-15 14:09
終端執行試試

終端執行,不行吧,這是有圖形界面的,有下一步的操作。

剛才試試修改 /etc/php.ini 中的

default_socket_timeout = 60
改為
default_socket_timeout = 600

并執行 systemctl restart php-fpm
好象沒用,還是1分鐘就操時了
作者: 科站網    時間: 2025-1-15 14:45
一步步設置不同的step去執行好了
作者: IsaacZ    時間: 2025-1-15 15:04
標簽自動刷新 - Microsoft Edge Addons
https://microsoftedge.microsoft.com/addons/detail/標簽自動刷新/bicjibdndeejemialpbohjpiimehbapb
作者: IsaacZ    時間: 2025-1-15 15:26
要解決 Gateway Timeout (504) 錯誤,主要需要調整以下超時配置:



不要只調整一個地方。

作者: iwuyou    時間: 2025-1-15 15:31
IsaacZ 發表于 2025-1-15 15:26
要解決 Gateway Timeout (504) 錯誤,主要需要調整以下超時配置:

我在 /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
作者: 鴻茂傳媒    時間: 2025-1-15 15:42
如有需求,可以有償處理升級。
作者: iwuyou    時間: 2025-1-15 15:55
IsaacZ 發表于 2025-1-15 15:26
要解決 Gateway Timeout (504) 錯誤,主要需要調整以下超時配置:

request_terminate_timeout 這個參數已經找到

vi /etc/php-fpm.d/www.conf
;request_terminate_timeout = 0
改為
request_terminate_timeout = 600
作者: IsaacZ    時間: 2025-1-15 19:45
在 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。
修改后重啟相關服務即可生效。
作者: iwuyou    時間: 2025-1-15 20:09
IsaacZ 發表于 2025-1-15 19:45
在 Fedora Linux 32 系統中,使用 Apache 和 PHP-FPM 時,調整以下配置文件以解決 Gateway Timeout (504)  ...

經過以下修改,超時明顯好轉,只中斷3次,不像以前近百次

vi /etc/php-fpm.d/www.conf
;request_terminate_timeout = 0
改為
request_terminate_timeout = 600


vi /etc/httpd/conf/httpd.conf
增加
Timeout 600

vi /etc/php.ini

default_socket_timeout = 60
改為
default_socket_timeout = 600


max_execution_time = 30
改為
max_execution_time = 300


max_input_time = 60  
改為
max_input_time = 600


systemctl restart php-fpm




歡迎光臨 Discuz! 官方交流社區 (http://www.9999xn.com/) Powered by Discuz! W1.0