内存溢出问题导致项目无法访问

18266

问题描述

线上环境启动 之后运行项目:
502 Bad Gateway

截图

报错信息

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 36864 bytes) in /www/wwwroot/ab.xxx.com/vendor/topthink/think-orm/src/db/PDOConnection.php on line 797

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 36864 bytes) in /www/wwwroot/ab.xxx.com/vendor/topthink/think-orm/src/db/PDOConnection.php on line 797
Worker[695550] process terminated with ERROR: E_ERROR "Allowed memory size of 536870912 bytes exhausted (tried to allocate 36864 bytes) in /www/wwwroot/ab.xxx.com/vendor/topthink/think-orm/src/db/PDOConnection.php on line 797"
worker[webman:695550] exit with status 65280
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/ab.xxx.com/vendor/topthink/think-orm/src/db/PDOConnection.php on line 797

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/ab.xxx.com/vendor/topthink/think-orm/src/db/PDOConnection.php on line 797
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/ab.xxx.com/vendor/workerman/workerman/Worker.php on line 2125

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/ab.xxx.com/vendor/workerman/workerman/Worker.php on line 2125
worker[webman:695556] exit with status 65280

截图报错信息里报错文件相关代码

然后终端报错信息:
截图

操作系统及workerman/webman等框架组件具体版本

linux 阿里陇西操作系统 webman4.1.4

环境就是宝塔部署的nginx1.2、php8.0

668 2 0
2个回答

18266

宝塔面板下面生成了一个php-cli.ini文件
截图

  • 暂无评论
xiuwang

think-orm 报的内存超限,感觉是你业务一次请求从数据库读的数据太多了导致的

  • 暂无评论
年代过于久远,无法发表回答
🔝