laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.74k stars 291 forks source link

Fix Swoole in-memory timer table size #819

Closed miguilimzero closed 7 months ago

miguilimzero commented 7 months ago

The current implementation of the timer table starts to throw some insufficient memory errors when there are a lot of workers ~200 and when all those workers are processing requests at the same time (as reported at https://github.com/laravel/octane/issues/648).

The https://github.com/laravel/octane/pull/650 PR introduced the max_timer_table_size undocumented config value so we can control the timer table size manually to avoid this problem.

However, ensuring the $size passed to the table creation will guarantee the desired number of rows (with https://github.com/laravel/octane/pull/818). We can now use the number of workers to define the timer table size and get rid of the undocumented manual parameter.

taylorotwell commented 7 months ago

I don't understand why we wouldn't just document the configuration option instead?