Closed nitrogenium closed 4 years ago
Can you provide more information?
What kind of information is needed?
"invalid data found in the buffer (possible echo)" How can I look at this invalid data? At least.
If problem can be reproduced, and you can attach your code samples/configs/system info - I can try to reproduce and fix problem with you.
How can I look at this invalid data? At least.
Ask about whis in RR repository - this package is only bridge between Laravel framework and RR
Thank you for the great package, by the way.
It's very easy to reproduce. Suppose that the controller accidentally contains "echo ('my_string')".
An error occurs: "invalid data found in the buffer (possible echo)"
How do I know that invalid data are "my_string" ? If I had seen the data or an error message that hits the buffer, I'd be happy.
Now I'm blind, it makes debugging very difficult.
Debugging using echo
(or similar functions) is not possible (RR uses own format for interaction between worker and daemon). But (!) you can use stacked-dumper-laravel for this :)
I know that :) For debugging, i use xdebug or \dev\dd | \dev\dump. It's just an illustration of the problem. Sometimes something hits the buffer and I have no idea what, where or how to find it. I was hoping for your advice.
Idea - change workers relay, reproduce your error, and watch for actual stdout
? Or use global search for echo()
, print()
, fwrite()
or similar functions?
"Change workers relay, reproduce your error, and watch for actual stdout"
Sounds good :) But how I can apply it isn't quite clear yet.
Right now I have to use global search for echo(), print() and stuff like that. But I don't think it's the right approach. After all, the problem may be in an external package.
After all, the problem may be in an external package
Easy :)
Anyway relay changing must helps you (after that - we are open for your PR with "clean" way for this feature)
After some thought, the best solution would be an option in roadrunner something like "Log invalid data".
Sometimes it's very difficult to reproduce the error, workers live long time, sometimes the error appears on the 50th request that came to the same worker. And it seems that the error appears directly from nothing.
Change workers relay - it may be useless for complicated scenarios.
IMHO
I agree with you. Close issue
Sometimes something goes wrong and I see a mistake like:
app_1 | INFO[1415] 172.23.0.1 {43.6ms} 500 GET http://localhost:4001/my_url worker error: invalid data found in the buffer (possible echo)
At the same time laravel.log - has nothing.
What is the best debugging strategy in this case? If I could quickly see this "invalid data", it would save bit time and improve developer experience :)