Welcome! Log In Create A New Profile

Advanced

Re: Error response body not sent if upload is incomplete

December 30, 2017 03:44PM
Find the server logs below. It does seem to match what you've quoted.

Do you think the upstream server (uwsgi) is the one not returning the body?

I was able to fix this by consuming the request body in my application before returning the response. However, I'm still wondering how nginx is supposed to behave in such situations.

Log for the request with the larger file:
api-server_1 | [pid: 21|app: 0|req: 1/1] 172.19.0.1 () {38 vars in 601 bytes} [Sat Dec 30 11:14:46 2017] POST / => generated 54 bytes in 2 msecs (HTTP/1.1 403) 2 headers in 78 bytes (1 switches on core 0)
api-server_1 | 2017/12/30 11:14:46 [error] 12#12: *1 readv() failed (104: Connection reset by peer) while reading upstream, client: 172.19.0.1, server: , request: "POST / HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "0.0.0.0:5000"
api-server_1 | 172.19.0.1 - - [30/Dec/2017:11:14:46 +0000] "POST / HTTP/1.1" 403 25 "-" "curl/7.55.1" "-"

With the smaller file:
api-server_1 | 172.19.0.1 - - [30/Dec/2017:11:15:41 +0000] "POST / HTTP/1.1" 403 79 "-" "curl/7.55.1" "-"
api-server_1 | [pid: 20|app: 0|req: 3/4] 172.19.0.1 () {38 vars in 595 bytes} [Sat Dec 30 11:15:41 2017] POST / => generated 54 bytes in 1 msecs (HTTP/1.1 403) 2 headers in 78 bytes (1 switches on core 0)
Subject Author Posted

Error response body not sent if upload is incomplete

naktinis December 29, 2017 03:23PM

Re: Error response body not sent if upload is incomplete

Valentin V. Bartenev December 29, 2017 03:54PM

Re: Error response body not sent if upload is incomplete

naktinis December 30, 2017 03:44PM

Re: Error response body not sent if upload is incomplete

Maxim Dounin January 01, 2018 03:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready