Open freshleafmedia opened 1 year ago
@rustatian could you comment - is this expected behavior for the rr, or not?
As far as I can tell from the logs, there is no suspicious activity or syntax errors inside the worker. If there is an error, RR won't start such a worker. I see that 2 workers were started and then stopped:
"sending stop request to the worker","pid":18}
The last error in the logs is probably related to the HTML of smt. Because this is the http
log.
So I'm guessing that the error is somewhere in the @freshleafmedia worker, leading to the hang and 100CPU spin (keep in mind that you're using debug mode, where workers are allocated per-request).
This isssue is not related to the RR.
P.S.: RR does not officially support Laravel π
@rustatian Thanks for the input.
You mention the error is possibly somewhere in our worker but the worker we are using is the one provided in this repo
What is the expected behaviour when encountering a FatalError? I expected that the response from PHP's error handling to be returned to the browser, instead it is returned to the console?
@freshleafmedia This is not a good practice to return an error to the browser, moreover, this is insecure. RR logs the error and returns the status code with the general information, like bad request, internal error, etc. By worker, I mean the code you wrote inside that worker π
@rustatian
By worker, I mean the code you wrote inside that worker π
Understood :smile:
In a production environment I completely agree, you would never want to show error messages. However while in a development environment it is common to show details of an exception.
By default Laravel comes with a package called ignition which renders details about an exception to the browser:
Given that this is 'just' a HTTP response I'm not sure why RR can not return this content to the browser. I suspect it is something to do with it being a FatalError and the registering of error handlers.
RR does correctly return the error view for other types of error message.
Feel free to use our awesome tool, instead of paid, basic Laravel piece of π : https://buggregator.dev/
Describe the bug
When the code contains a syntax error the RR worker locks up and never responds.
Expected behaviour
An Ignition debug page
Actual behaviour
RR worker goes to 100% CPU and the browser times out
Steps to reproduce
routes/web.php
System information
8.2.9
v5.12.0
2023.2.0
docker
10.20.0
RoadRunner configuration file content
Package configuration file content
Using the default
https://github.com/roadrunner-php/laravel-bridge/blob/v5.12.0/config/roadrunner.php
Additional context
If I add logging to the
.rr.yaml
:I can see the following, and it just keeps repeating:
(lines truncated for brevity)
I believe it is the Ignition HTML page being output.
Even after the syntax error is corrected the rr worker will keep going until it has finished writing the error report which can take a little while.