fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.35k stars 343 forks source link

upstream timed out #1427

Open Vis-Wing opened 1 year ago

Vis-Wing commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

jtojnar commented 1 year ago

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.