php报错是这样的:
PHP Fatal error:Allowed memory size of 2147483648 bytes exhausted (tried to allocate 67108864 bytes)
php中memory_limit调大,比如40960M
或者在程序中加上
set_time_limit(0); //设置脚本最大执行时间为0永不过期
ini_set('memory_limit', '-1'); //Fatal error: Allowed memory size of 2147483648 bytes exhausted
ini_set('display_errors', 'on');
//error_reporting(E_ALL); //不展示报错信息
nginz报错是这样的:
2022/12/19 15:42:30 [error] 126627#0: *199459193 upstream timed out (110: Connection timed out) while reading response header from upstream
修改nginx超时时间
keepalive_timeout 3000;
fastcgi_connect_timeout 300;
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
再重启nginx服务
mysql可能会报一个错误,原因是一个超长的SQL执行完后,再执行其他SQL,那么mysql会超时
PDO::prepare(): MySQL server has gone away
修改mysql超时时间
wait_timeout = 3000