Closed Danielss89 closed 2 weeks ago
This looks like a network issue on your side. Are you using any special extension?
Only "special" extension i can think of is Blackfire. I didn't change anything in the Dockerfile other than the Frankenphp version though.
Could you identify what is the connection that is broken (to which service/client/etc)?
10.244.14.69 is a traefik pod(Using Traefik as ingress)
I disabled blackfire extension, and now i don't get any logoutput at all from frankenphp(other than the initial startup logs). All i have now is the "Internal Server Error" in the browser. Any way i can get more verbose output from Frankenphp to see what the error is?
Is it a PHP or a Caddy error? You can try to set the debug
directive and enable PHP errors logging (error_reporting
) in your php.ini
.
I already have:
display_errors On On
error_reporting E_ALL & ~E_DEPRECATED
log_errors On On
I don't know if it's caddy or php, all it says on webpage is Internal Server Error
Could you provide a minimal reproducer, or at least copy your Caddyfile
(if any) and the code that triggers the error?
It's a big legacy app, so i'm not sure where it fails, so i will have to step debug to figure out, i just hoped it could show the error easily so i wouldn't have to :D
Luckily it was one of the first things the applications did :D The 103 header function! When i comment out headers_send(103); the application works.
Interesting. Is it done too early? Anyway, this is a bug. I would love to get a minimal reproducer to try to fix this.
Hi @Danielss89
I had a similar problem using nginx (or, more specifically, the nginx-proy-manager docker image) to redirect to my frankenphp server. Here was the error my frankenphp server gave me:
{"level":"error","ts":1719411265.3278,"msg":"write error","error":"write tcp 172.20.0.11:80->172.20.0.4:50488: write: broken pipe"}
I don't know about traefik, but what solved my problem was to add the following elements to my custom configuration:
proxy_buffers 16 16k;
proxy_buffer_size 32k;
So I'm putting that here so it could maybe be useful to someone else.
Do you think a similar configuration in traefik could solve your issue? I never used it before, but I found this page that might help you get started: https://doc.traefik.io/traefik/middlewares/http/buffering/
@Narthall sometimes I wish I could reach through the screen and grab someone and give them a hug wet kiss - or at least a high five of thanks... My FrankenPHP was stalling several times a day for several mins with this broken pipe issue, but I was also proxying to it from Nginx gateway. It was not FrankenPHP stalling though, but Nginx basically saying the proxy was not healthy and so not using it for a short duration, after the broken pipe. Anyways, I have added the proxy_* settings you give (which were lower values than the ones I had already copied years ago when using nginx->nginx/php-fpm and it now seems stable. So Thanks for taking the time to comment.
Would you mind to add this to the documentation? This can save a lot of time for many NGINX users!
Closing for now as it's not directly FrankenPHP-related.
I have a few more "gotchas" I could add a whole section (at the weekend) on moving from proxied nginx->nginx/php-fpm to proxied nginx->docker(FrankenPHP) around tls (proxy_ssl_server_name/proxy_ssl_name/proxy_ssl_verify when using tls internal)
That would be awesome!
What happened?
I upgraded Frankenphp docker image from 1.0.3 to 1.2.0 and now i am getting "Internal server error" when loading a page and the output below. Hosted on k8s.
Build Type
Docker (Debian Bookworm)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output