Skip to content
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 timed out #1427

Open
Vis-Wing opened this issue Apr 11, 2023 · 3 comments
Open

upstream timed out #1427

Vis-Wing opened this issue Apr 11, 2023 · 3 comments
Labels

Comments

@Vis-Wing
Copy link

Q: My program often has the following error that causes the entire program to be 504 wrong, how should I deal with it
[error] 1046#1046: *2094 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.17.1, server: localhost, request: "GET /update HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.17.128"

@jtojnar
Copy link
Member

jtojnar commented Apr 11, 2023

You will need to increase the timeout of your web server. It will depend on your web server. For example, with nginx, you would need to set fastcgi_read_timeout.

Possibly also client_body_timeout or send_timeout.

And max_execution_time on PHP side.

@jtojnar
Copy link
Member

jtojnar commented Apr 12, 2023

#1428 should reduce the need for read timeouts on nginx side.

@jtojnar
Copy link
Member

jtojnar commented Apr 13, 2023

Testing it locally, it does not seem to help alone, as PHP, as well as both Apache and nginx buffer the response by default. I have opened #1430 with a more complete fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants