Your software version (Screenshot of your startup)
Software
Version
PHP
TODO
Swoole
TODO
Laravel/Lumen
TODO
PHP 8.1
OpenSwoole 4.11.1
Laravel 9.0 but any version
Detail description about this issue(error/log)
Since OpenSwoole version 4.7.1 a new concurrency mode has been introduced which makes worker process reload after completing each request just like PHP-FPM, and it still allows to use coroutines (concurrency) within request. So the requests are served by the Worker Process in Synchronous way but within each request we can use co:create, or go().
That enables traditional PHP-FPM based PHP-Frameworks to make smooth transition to OpenSwoole without change.
To enable that mode, we just need to make coroutine setting as below:
co::set([max_concurrency => 1]);
Question-1: Given the fact above, why not use coroutines in Swoole\Http\Server->on("request", callback() { }); in Larave-S ?
Question-2: Where to put configuration for co::set() in Laravel-S ?
Your software version (Screenshot of your startup)
PHP 8.1 OpenSwoole 4.11.1 Laravel 9.0 but any version
Detail description about this issue(error/log)
Since OpenSwoole version 4.7.1 a new concurrency mode has been introduced which makes worker process reload after completing each request just like PHP-FPM, and it still allows to use coroutines (concurrency) within request. So the requests are served by the Worker Process in Synchronous way but within each request we can use co:create, or go().
That enables traditional PHP-FPM based PHP-Frameworks to make smooth transition to OpenSwoole without change.
To enable that mode, we just need to make coroutine setting as below:
co::set([max_concurrency => 1]);
Question-1: Given the fact above, why not use coroutines in Swoole\Http\Server->on("request", callback() { }); in Larave-S ? Question-2: Where to put configuration for co::set() in Laravel-S ?