Once I have executed this command php artisan WebSockets:serve and I just leave my computer idle or sleep mode. After 7-8 hours ( checked from WebSocket's statistic table ), the WebSockets has stopped working. Following is the log that I retrieved from my server's command prompt.
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
According to the log, it keeps showing "Exception InvalidArgumentException" until the PHP Fatal error happened. I even upgraded my memory_limit from 128M to 256M in php.ini file. Still getting this error on my server.