Laravel作业监听器运行了数以万计的记录,并提供了错误
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
关系与它有什么关系?
答案 0 :(得分:2)
你提到Laravel作业监听器,它让我假设你通过命令行运行它。命令行执行的Toolbar toolbar;
toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setPadding(0, 0, 0, 0);//for tab otherwise give space in tab
toolbar.setContentInsetsAbsolute(0, 0);
setSupportActionBar(toolbar);
可能与Web服务器加载的不同。请确保php.ini
的{{1}}值相同。要从shell(假设Linux)查找命令行memory_limit
的位置,请运行
php.ini