Nginx 1.8 proxying to Netty - timeout from upstream
Maxim Dounin
mdounin at mdounin.ru
Wed Jul 22 21:55:12 UTC 2015
Hello!
On Tue, Jul 21, 2015 at 03:33:13PM -0400, smuthali wrote:
> I have setup Nginx proxy to a Netty server. I am seeing a timeout from
> upstream, i.e. Netty. The consequence of this timeout is that the JSON
> payload response is truncated (as seen on browser developer tools)
>
> 2015/07/21 05:08:56 [error] 6#0: *19 upstream prematurely closed connection
> while reading upstream, client: 198.147.191.15, server:
> sbox-wus-ui.cloudapp.net, request: "GET /api/v1/entities/DEVICE HTTP/1.1",
> upstream: "http://10.0.3.4:8080/api/v1/entities/DEVICE", host:
> "sbox-wus-ui.cloudapp.net", referrer:
> "https://sbox-wus-ui.cloudapp.net/home.html"
>
> So, yes I initially thought that this is a Netty issue. However, when I make
> the same API call on Netty I am able to the retrieve the full JSON payload.
>
> The JSON response message size is about 13k. The JSON response I see on the
> Nginx side is 10K. After spending some time reading up on the Nginx
> configuration parameters, I added client_body_temp and proxy_temp but to no
> avail. Any help is really appreciated.
The message suggests this is a backend problem. If you don't see
the problem by directly talking to the backend - this may be
because the problem only appears in some specific conditions
triggered by nginx, e.g., only when HTTP/1.0 is used.
If in doubt, try looking in nginx debug log and/or tcpdump to find
out what's going on on the wire.
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list