使用队列偶尔会报错,请问怎么排查问题?
业务场景:呼叫中心通话结束后,laravel通过redis队列下载录音文件
使用工具:supervisor
偶尔会在supervisor里面看到报错:
我现在php内存增加到128M
还是偶尔会报错,难不成还是内存不够?
[2021-03-16 14:01:35][KAN56eRFnaozEo3YCBoAAMLUdRQOPZx8] Processing: App\Jobs\DownloadRecording
Symfony\Component\ErrorHandler\Error\FatalError
Allowed memory size of 134217728 bytes exhausted (tried to allocate 1404928 bytes)
at vendor/guzzlehttp/psr7/src/Stream.php:95
91▕ if (!isset($this->stream)) {
92▕ throw new \RuntimeException('Stream is detached');
93▕ }
94▕
➜ 95▕ $contents = stream_get_contents($this->stream);
96▕
97▕ if ($contents === false) {
98▕ throw new \RuntimeException('Unable to read stream contents');
99▕ }
Whoops\Exception\ErrorException
Allowed memory size of 134217728 bytes exhausted (tried to allocate 1404928 bytes)
at vendor/guzzlehttp/psr7/src/Stream.php:95
91▕ if (!isset($this->stream)) {
92▕ throw new \RuntimeException('Stream is detached');
93▕ }
94▕
➜ 95▕ $contents = stream_get_contents($this->stream);
96▕
97▕ if ($contents === false) {
98▕ throw new \RuntimeException('Unable to read stream contents');
99▕ }
[2m+1 vendor frames [22m
2 [internal]:0
Whoops\Run::handleShutdown()
laravel里面日志:
[2021-03-16 14:01:37] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1404928 bytes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 1404928 bytes) at /www/wwwroot/saas/vendor/guzzlehttp/psr7/src/Stream.php:95)
[stacktrace]
#0 {main}
"}
推荐文章: