Set PHP Timeout
When PHP reaches the maximum time in server configuration to execute a script, it shows an error. It can sometimes trigger WordPress 502 Bad Gateway Error. To avoid this, simply increase the maximum execution time value. It is set to 300 seconds by default, which is 5 minutes.
当 PHP 达到服务器配置中执行脚本的最长时间时,它会显示错误。它有时会触发 WordPress 502 错误网关错误。为避免这种情况,只需增加最大执行时间值即可。默认情况下设置为 300 秒,即 5 分钟。
经过测试,我的网站通过设置第9点,延长执行时间,可以解决问题。2023-11-08
参考链接:https://www.cloudways.com/blog/wordpress-502-bad-gateway-error/#set-php-timeout
更新附加:2023年11月12日
竟然发现是 PHP 版本的问题,PHP 8.0 会导致 502 Bad Gateway