Thursday, 25 March 2021

Gunicorn + nginx - Ignoring EPIPE

I have an nginx-gunicorn-flask setup running on google compute and I keep getting the following from gunicorn:

[2019-04-19 20:50:49 +0000] [3345] [DEBUG] POST /
[2019-04-19 20:50:49 +0000] [3345] [DEBUG] Ignoring EPIPE

out of 100 requests about 23 come out like that. In the access log only 23 requests show and they're all 200.

from nginx access logs show a 504 and in the error logs I see this:

2019/04/19 20:50:49 [error] 3097#3097: *295 upstream timed out (110: Connection timed out) while sending request to upstream, client: ip, server: , request: "POST / HTTP/1.1", upstream: "http://unix:/home/user/Server/server.sock/", host: "ip"

I tried setting

proxy_connect_timeout 75s;
proxy_read_timeout 300s;

on the location on nginx and --timeout 300 in gunicorn based on other questions but it didn't help.

The message from gunicorn isn't really helping determine the cause and I didn't find any info about it

Been trying to solve this for a while and I'd appreciate any ideas. Also each of these requests take about 1-2 seconds and jmeter shows a huge latency until the results show up.

Looking at gunicorn's code this is a errno.EPIPE exception having to do with the socket...



from Gunicorn + nginx - Ignoring EPIPE

No comments:

Post a Comment