-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swoole\Table::set(): failed to set('161'), unable to allocate memory Due to fixed table size #648
Comments
You need to set the size of the table to be a bit larger, which can be changed in the config. Lines 165 to 170 in f4907e7
|
@sy-records thanks for your reply.
I don't use any octane table or swoole table, but still encounter the error. |
Can you provide a complete error stack? |
Sure. PHP Fatal error: Uncaught ErrorException: Swoole\Table::set(): failed to set('165'), unable to allocate memory in /var/www/vendor/laravel/octane/src/Tables/SwooleTable.php:88
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/vendor/laravel/octane/src/Tables/SwooleTable.php(88): Swoole\Table->set()
#2 /var/www/vendor/laravel/octane/bin/swoole-server(110): Laravel\Octane\Tables\SwooleTable->set()
#3 [internal function]: {closure}()
#4 /var/www/vendor/laravel/octane/bin/swoole-server(164): Swoole\Server->start()
#5 {main}
thrown in /var/www/vendor/laravel/octane/src/Tables/SwooleTable.php on line 88 |
Description:
I got the exception recently in the
php-fpm
log:My server still has
10+
GB RAM, so it should not lack memory.Then I found the tableSize in the
vendor/laravel/octane/bin/createSwooleTimerTable.php
is a const:250
,but I specified the worker number in the
octane:start
command is300
,php /var/www/artisan octane:start --host=0.0.0.0 --port=9000 --task-workers=600 --workers=300
so I think I got this error because my worker number is larger than the const number
250
.Expected
Can tableSize be configurable or increased by worker number?
Steps To Reproduce:
I've tried these steps on a local machine but I can't reproduce it.
250
to5
invendor/laravel/octane/bin/createSwooleTimerTable.php
routes/web.php
php artisan octane:start --workers=10 --max-requests=5
sleep
The text was updated successfully, but these errors were encountered: