Horizon 中有个配置
/*
|--------------------------------------------------------------------------
| Memory Limit (MB)
|--------------------------------------------------------------------------
|
| This value describes the maximum amount of memory the Horizon master
| supervisor may consume before it is terminated and restarted. For
| configuring these limits on your workers, see the next section.
|
*/'memory_limit'=>512,
如果你希望你的队列或任务脚本在运行时限制内存使用,这需要在php.ini文件中配置,或使用ini_set('memory_limit','size');
楼主说的是 PHP的
memory_limit
设置吧,和消息队列和计划任务没有直接关系啊,消息队列如果是redis存贮,可能会超出内存限制