【发布时间】:2018-02-01 04:42:51
【问题描述】:
Laravel 作业侦听器正在运行超过 10 万条记录,并给出错误
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1179648 bytes) in .../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php on line 184
[Symfony\Component\Debug\Exception\FatalErrorException]
Allowed memory size of 268435456 bytes exhausted (tried to allocate 1179648 bytes)
我已经使用 phpinfo() 证明了 memory_limit = 512M,所以我不知道当 512 > 268 时会发生什么:) - 还有 belongsTo 关系与它有什么关系?
【问题讨论】: