beyondcode / laravel-websockets

Websockets for Laravel. Done right.
https://beyondco.de/docs/laravel-websockets
MIT License
5.08k stars 630 forks source link

Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes) #1172

Closed michalevk closed 9 months ago

michalevk commented 1 year ago

Hi,

My problem is that the hosting has banned me from using programs other than "nohup". Using production from php artistn websockets:serve and after an hour of work, an error pops up

`PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes) in /home/admin/domains---/public_html/vendor/react/http/src/Io/Transaction.php on line 198

Symfony\Component\ErrorHandler\Error\FatalError

Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes)

at vendor/react/http/src/Io/Transaction.php:198 194▕ }); 195▕ 196▕ // buffer response body data in memory 197▕ $body->on('data', function ($data) use (&$buffer, $maximumSize, $body, $closer, $reject) { ➜ 198▕ $buffer .= $data; 199▕ 200▕ // close stream and reject promise if limit is exceeded 201▕ if (isset($buffer[$maximumSize])) { 202▕ $buffer = '';

Whoops\Exception\ErrorException

Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes)

at vendor/react/http/src/Io/Transaction.php:198 194▕ }); 195▕ 196▕ // buffer response body data in memory 197▕ $body->on('data', function ($data) use (&$buffer, $maximumSize, $body, $closer, $reject) { ➜ 198▕ $buffer .= $data; 199▕ 200▕ // close stream and reject promise if limit is exceeded 201▕ if (isset($buffer[$maximumSize])) { 202▕ $buffer = '';

  +1 vendor frames 

2 [internal]:0 Whoops\Run::handleShutdown()`