一旦我执行了这个命令 php artisan WebSockets:serve ,我就让我的电脑处于空闲或睡眠模式。7-8 小时后(从 WebSocket 的统计表中检查),WebSockets 停止工作。以下是我从服务器的命令提示符中检索到的日志。
ExceptionInvalidArgumentExceptionthrown:Unable to parse URI: http://:6001/
apps/{app_id}/events?auth_key={CUSTOM_APP_ID}&auth_signature=a15f9e44b3acc77160d228d8
6c733c4813c54d73e321fb3a1643249eab25531d&auth_timestamp=1611788876&auth_version=
1.0&body_md5=bbafc96e27e4303190e125ed0345c6c5`
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Server\Directory\vendor\react\promise-stream\src\functions.php on line 61
Symfony\Component\Debug\Exception\FatalErrorException : Allowed memory size
of 134217728 bytes exhausted (tried to allocate 262144 bytes)
at Server\Directory\vendor\react\promise-stream\src\functions.php:6
1
57| $buffer = '';
58|
59| $promise = new Promise\Promise(function ($resolve, $reject) use ($st
ream, $maxLength, &$buffer, &$bufferer) {
60| $bufferer = function ($data) use (&$buffer, $reject, $maxLength)
{
61| $buffer .= $data;
62|
63| if ($maxLength !== null && isset($buffer[$maxLength])) {
64| $reject(new \OverflowException('Buffer exceeded maximum
length'));
65| }
Whoops\Exception\ErrorException: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes)
at Server\Directory\vendor\react\promise-stream\src\functions.php:6
1
57| $buffer = '';
58|
59| $promise = new Promise\Promise(function ($resolve, $reject) use ($st
ream, $maxLength, &$buffer, &$bufferer) {
60| $bufferer = function ($data) use (&$buffer, $reject, $maxLength)
{
61| $buffer .= $data;
62|
63| if ($maxLength !== null && isset($buffer[$maxLength])) {
64| $reject(new \OverflowException('Buffer exceeded maximum
length'));
65| }
Exception trace:
1 Whoops\Run::handleError("Allowed memory size of 134217728 bytes exhausted
(tried to allocate 262144 bytes)", "Server\Directory\vendor\react\pro
mise-stream\src\functions.php")
Server\Directory\vendor\filp\whoops\src\Whoops\Run.php:454
2 Whoops\Run::handleShutdown()
[internal]:0
根据日志,它一直显示“Exception InvalidArgumentException”,直到发生 PHP 致命错误。我什至将 php.ini 文件中的 memory_limit 从 128M 升级到 256M。我的服务器上仍然出现此错误。