Closed eleven26 closed 3 years ago
When using swoole, the server started by php artisan octance:start --server=swoole cannot be stopped by octane:stop.
php artisan octance:start --server=swoole
octane:stop
./vendor/bin/sail up
./vendor/bin/sail shell
ps -ef
sail 27 20 0 11:44 ? 00:00:00 swoole_http_server: master process for Laravel sail 28 27 0 11:44 ? 00:00:00 swoole_http_server: manager process for Laravel sail 31 28 1 11:44 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 32 28 1 11:44 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 33 28 1 11:44 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 34 28 1 11:44 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json
php artisan octane:stop --server=swoole
The final state:
sail 27 20 0 11:44 ? 00:00:00 swoole_http_server: master process for Laravel sail 28 27 0 11:44 ? 00:00:00 [php8.0] <defunct>
The php related process has a master process and a zombie process. The zombie process is the previous manager process.
Before reload:
sail 27 20 0 12:18 ? 00:00:00 swoole_http_server: master process for Laravel sail 28 27 0 12:18 ? 00:00:00 swoole_http_server: manager process for Laravel sail 31 28 0 12:18 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 32 28 0 12:18 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 33 28 0 12:18 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json sail 34 28 0 12:18 ? 00:00:00 /usr/bin/php8.0 swoole-server /var/www/html/storage/logs/octane-server-state.json
After reload:
sail 27 20 0 12:18 ? 00:00:00 swoole_http_server: master process for Laravel sail 28 27 0 12:18 ? 00:00:00 swoole_http_server: manager process for Laravel sail 52 28 3 12:19 ? 00:00:00 swoole_http_server: manager process for Laravel sail 53 28 3 12:19 ? 00:00:00 swoole_http_server: manager process for Laravel sail 54 28 3 12:19 ? 00:00:00 swoole_http_server: manager process for Laravel sail 55 28 3 12:19 ? 00:00:00 swoole_http_server: manager process for Laravel
After the octane:reload command is executed, the worker process is gone, and a corresponding number of manager processes are generated instead.
octane:reload
@eleven26 Can you try this again with the latest master?
@nunomaduro I tried it with the latest version, now it can stop and reload normally, thanks
Description:
When using swoole, the server started by
php artisan octance:start --server=swoole
cannot be stopped byoctane:stop
.Steps To Reproduce:
The final state:
The php related process has a master process and a zombie process. The zombie process is the previous manager process.
octane:reload
Before reload:
After reload:
After the
octane:reload
command is executed, the worker process is gone, and a corresponding number of manager processes are generated instead.