一,修改代码后使生效:
# php artisan octane:reload
INFO Reloading workers...
二,停止octane:
说明;用supervisor管理服务,此操作不生效
# php artisan octane:stop
INFO Stopping server...
三,查看状态:
# php artisan octane:status
INFO Octane server is running.
四,查看帮助
# php artisan octane --help
Laravel Framework 11.15.0
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands for the "octane" namespace:
octane:install Install the Octane components and resources
octane:reload Reload the Octane workers
octane:start Start the Octane server
octane:status Get the current status of the Octane server
octane:stop Stop the Octane server
五,启动octane:
# php artisan octane:start
INFO Server running….
Local: http://127.0.0.1:8000
Press Ctrl+C to stop the server
六,reload时报错:
# php artisan octane:reload
INFO Reloading workers...
ErrorException
Undefined array key "rpcPort"
at vendor/laravel/octane/src/RoadRunner/ServerProcessInspector.php:43
39▕ {
40▕ [
41▕ 'state' => [
42▕ 'host' => $host,
➜ 43▕ 'rpcPort' => $rpcPort,
44▕ ],
45▕ ] = $this->serverStateFile->read();
46▕
47▕ tap($this->processFactory->createProcess([
+16 vendor frames
17 artisan:13
Illuminate\Foundation\Application::handleCommand()
解决:
指定启动时使用的server即可:
# php artisan octane:reload --server=swoole
INFO Reloading workers...
标签:laravel,11,--,server,Octane,artisan,php,octane From: https://www.cnblogs.com/architectforest/p/18535121