-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Using --watch with Laravel Octane, causes browser request to stay in waiting state #1293
Comments
Hmm, could it be an issue with supervisor? I have removed the [supervisord]
nodaemon=true
user=%(ENV_SUPERVISOR_PHP_USER)s
logfile=/dev/null
logfile_maxbytes=0
logfile_backups=0
pidfile=/tmp/supervisord.pid
minfds=10000
[unix_http_server]
file=/tmp/supervisor.sock
chmod=0777
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[program:octane]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_OCTANE="1"
autostart=true
autorestart=true
priority=100
stopwaitsecs=3600
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:reverb]
command=php -d variables_order=EGPCS /app/artisan reverb:start
user=%(ENV_SUPERVISOR_PHP_USER)s
autostart=true
autorestart=true
priority=200
stopwaitsecs=3600
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:horizon]
command=php -d variables_order=EGPCS /app/artisan horizon
user=%(ENV_SUPERVISOR_PHP_USER)s
autostart=true
autorestart=true
priority=300
stopwaitsecs=3600
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:schedule]
command=php -d variables_order=EGPCS /app/artisan schedule:work
user=%(ENV_SUPERVISOR_PHP_USER)s
autostart=true
autorestart=true
priority=400
stopwaitsecs=3600
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 To start FrankenPHP in the container: php -d variables_order=EGPCS /app/artisan octane:frankenphp --caddyfile=/etc/caddy/Caddyfile --host=localhost --port=8080 --admin-port=2019 --workers=1 --max-requests=1 --watch I'm now limiting both the works to |
I think Laravel Octane uses chokidar for worker reloading. Have you tried using the new built in watcher instead? You'll need to configure 'watch' in your own Caddyfile, but it will reload more gracefully . |
@AlliBalliBaba Thanks! I did read about this, but in another issue it wasn't advised for Laravel Octane, and reload using I have disabled all caches, including opcache, and that also seems to help as well. Weird, if you do recommend the new watcher, I'll check it out instead. :) |
What happened?
I'm using the following supervisor command to start FrankenPHP for development:
For some reason, changing any PHP file causes FrankenPHP to not push the new state. It seems to refresh the workers internally, but the browser keeps waiting for 'something'. If I click the browser's refresh-button, it works fine. If I change
.vue
or any other resources, it works fine using hot-reloading.Maybe I don't need the
--watch
parameter? The Laravel Docs, suggest the following parameters instead:--workers=1 --max-requests=1
, but also this seem to also cause a hang (wait) requests.For some reason I also need to run
php artisan octane:reload
sometimes. Like it doesn't fully refresh the changes.Could you please tell me the correct parameters to use this for development? I think it's a bug, because it seem to work correctly a release ago. I did this this in Brave and Firefox, both the latest version.
Build Type
Custom (tell us more in the description)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
This is shown, but no GET request is later shown.. unless I manually restart the server.
The text was updated successfully, but these errors were encountered: