Closed Spittal closed 1 month ago
Do you have something in your app logs? This newly introduced panic occurs only when starting the worker script crashes several times. Maybe the application is left in a non-usable state (for instance, if you save a file that contains an error or crashing code).
@withinboredom @AlliBalliBaba I realize that this may be expected during the development process (this is common to have half-finished or even totally broken code while coding). When watchers are enabled and the log level is debug
(= in dev mode) maybe should display a warning but keep restarting the worker until the code is fixed instead of panicking? It could even be better to catch the PHP error, log it, and serve an error page displaying the error message (so developers can see the problem when they hit refresh and their browsers).
Yeah, this is the odd part, we don't get any app exceptions or application logging that I can ascertain. I think your proposed solution to not kill the process when in dev mode would help us a lot! If it's possible.
I think that maybe we should remove the panic entirely when the watcher is enabled, since this is mostly a dev feature.
What happened?
Occasionally and without consistent patterns, our Laravel app—which runs with FrankenPHP and Octane—crashes when a file is saved. To provide some context, we switched from the default Laravel Octane watcher, which is based on Chokidar, to the new FrankenPHP e-dant file watcher that was recently merged. We made this move due to frequent crashes with the previous setup that occurred without logs or any apparent means to reproduce the issue.
Our experience with the new e-dant based file watcher has been excellent so far; it is much faster and more reliable. However, we still experience rare crashes. but, at least we now receive logs when crashes occur.
I've been working with the team to attempt to reliably reproduce the crash at all, but it seems to happen without any consistent pattern of use.
I can however give you folks our exact
Dockerfile
Our
php.ini
And our
Caddyfile
(based off of the Laravel Octane stubbed Caddyfile with small changes)Other potentially relevant info, is that run our Docker containers with Orbstack, and our docker compose looks something like this.
Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
Apple Silicon
PHP configuration
Relevant log output