Skip to content
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

Getting failed to set key value, try to increase the table_size on unrelated task #985

Open
iblacker opened this issue Jan 16, 2025 · 1 comment

Comments

@iblacker
Copy link

Octane Version

2.6.0

Laravel Version

10.48.25

PHP Version

8.2.18

What server type are you using?

Open Swoole

Server Version

22.0.0

Database Driver & Version

No response

Description

I started getting the error "OpenSwoole\Exception(code: 501): failed to set key value, try to increase the table_size" when uploading files in production, a task that does not use octane.

As far as I know, uploading file is the function that causes this error. I couldn't reproduce it in local and it is inconsistent, but once it crashes, it crashes every time a file upload occurs. So far the only solution is to restart the octane server, it works fine until it eventually crashes again randomly.

[2025-01-16 14:54:48] production.ERROR: failed to set key value, try to increase the table_size {"userId":157,"exception":"[object] (OpenSwoole\\Exception(code: 501): failed to set key value, try to increase the table_size at /var/www/project/vendor/laravel/octane/src/Tables/OpenSwooleTable.php:36) [stacktrace] #0 /var/www/project/vendor/laravel/octane/src/Tables/OpenSwooleTable.php(36): OpenSwoole\\Table->set() #1 /var/www/project/vendor/laravel/octane/src/Cache/OctaneStore.php(87): Laravel\\Octane\\Tables\\OpenSwooleTable->set() #2 /var/www/project/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(216): Laravel\\Octane\\Cache\\OctaneStore->put() #3 /var/www/project/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(327): Illuminate\\Cache\\Repository->put() #4 /var/www/project/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php(135): Illuminate\\Cache\\Repository->add() #5 /var/www/project/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php(116): Illuminate\\Cache\\RateLimiter->increment() #6 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(156): Illuminate\\Cache\\RateLimiter->hit() #7 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(90): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest() #8 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle() #9 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #10 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle() #11 /var/www/project/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #12 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle() #13 /var/www/project/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #14 /var/www/project/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest() #15 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle() #16 /var/www/project/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #17 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle() #18 /var/www/project/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #19 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle() #20 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #21 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then() #22 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack() #23 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute() #24 /var/www/project/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute() #25 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch() #26 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #27 /var/www/project/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #28 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\\DisableBrowserCache->handle() #29 /var/www/project/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #30 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle() #31 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #32 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #33 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle() #34 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #35 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #36 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle() #37 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #38 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle() #39 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #40 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle() #41 /var/www/project/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #42 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle() #43 /var/www/project/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #44 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle() #45 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #46 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then() #47 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #48 /var/www/project/vendor/laravel/octane/src/ApplicationGateway.php(36): Illuminate\\Foundation\\Http\\Kernel->handle() #49 /var/www/project/vendor/laravel/octane/src/Worker.php(84): Laravel\\Octane\\ApplicationGateway->handle() #50 /var/www/project/vendor/laravel/octane/bin/swoole-server(122): Laravel\\Octane\\Worker->handle() #51 [internal function]: {closure}() #52 /var/www/project/vendor/laravel/octane/bin/swoole-server(172): OpenSwoole\\Server->start() #53 {main} "}

Any help is appreciated, I have had this issue for a few days now.

Steps To Reproduce

Uploading file will randomly cause the error "failed to set key value, try to increase the table_size". Restarting octane will temporarily fix the issue.

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants