-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Upstream prematurely closed connection while reading response header from upstream #557
Comments
Do you have logs from frankenphp? |
did you know where is frankenphp log located? I've googled and didn't find any clue... |
It's usually in regular output, so it largely depends on how you are running it. If you are running it via systemd, then it will be with all your other logs ( |
have the same error with laravel forge and octane (frankenphp) |
Is this endpoint a long running connection (SSE or something like that)? Of yes, this is likely a timeout issue. Is the PHP timeout disabled? Caddy timeout should be disabled by default. |
It is not a long running process/request. We just request a basic login
page, then a submit a login then error.
…On Mon, 12 Feb 2024, 04:22 Kévin Dunglas, ***@***.***> wrote:
Is this endpoint a long running connection (SSE or something like that)?
Of yes, this is likely a timeout issue. Is the PHP timeout disabled? Caddy
timeout should be disabled by default.
—
Reply to this email directly, view it on GitHub
<#557 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6ADM2QWPECURM5AHHFRTTYTESAHAVCNFSM6AAAAABC4A433GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXHA2TSMZTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
According to the logs, the error is on |
yes the error is on 'POST /livewire/update' in on laravel using livewire, but I'm not really sure what is that really entail...I'm googling the error but do not find sameone has the same problem, in my local I've install the app on laradock which is inside a docker and the frankenphp is running well, but not on server (PLOI), I hope this information is useful for you... The only error I could find was as described in the Relevant Log Output |
I wrote to Forge support team. They tested my application on the server and it is their answer: It appears like the FrankenPHP server crashes whenever it receives a request. It does so without writing anything to the log files. You'll need to follow the issue reported on the FrankenPHP repo. |
I also use Livewire |
Would you be able to give me access to the crashing code, even privately? |
I also encounter this problem when deploying my app using the frankenphp image as a base image in kubernetes. It keeps restarting after receiving a request. But, it works fine when I run the image using docker-compose on my server. here is the log
|
This could be happening for any number of reasons, but your pod security policy is the most likely one. What does your deployment yaml file look like? |
I solve it, well not really...I created image docker for my project and frankenphp in it, after that I combine with nginx proxy manager |
here's my deployment yaml:
|
Having the same issue. It works with the same image in docker-compose, but on Kubernetes it fails. @withinboredom could you maybe elaborate more on how podsecuritypolicy could affect this? |
If you are running in k8s as a non-root user, you have to give it CAP_NET_BIND_SERVICE. Even if you aren't opening a lower port. I have no idea why. |
Oh, got it. I already tried that and got the same issue. I'm going to work to make a reproducible proof of concept in another repo so anyone can try it. |
Here's a policy that works on a production cluster securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE |
Yup, that is a a thing that I have in my cluster and after 1 or 2 requests the pod errors out and restarts. Nothing usable in the logs with debug on, tho. |
Ok, apologies, my bug is not directly related to this, as soon as I disabled latest datadog PHP tracer (0.99.1) everything works. I think it is related to this #458 (comment) |
Closing as can't reproduce (and maybe already reported or even fixed). Feel free to reopen if you have more information. |
What happened?
Need help, facing Nginx Error Log "...upstream prematurely closed connection while reading response header from upstream, client: 112.215.65.47, server: xxxxxxxxxx, request: "POST /livewire/update HTTP/2.0", upstream: "http://127.0.0.1:8000/livewire/update"
Anyone experienced this? Or can point where to look for resolution...
Build Type
Custom (tell us more in the description)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
Relevant log output
The text was updated successfully, but these errors were encountered: