Nginx chunked response

Maxim Dounin mdounin at mdounin.ru
Tue May 22 13:51:59 UTC 2018


Hello!

On Tue, May 22, 2018 at 09:22:44AM -0400, satishkori wrote:

> Nginx some times does not serve whole response but only first chunk. We
> don't see this kind of behaviour all the times. Below our configuration.
> 
> http {
>     include       mime.types;
>     default_type  application/octet-stream;
>     sendfile        on;
>     keepalive_timeout  65;
>  
> 
> location "/"  {
> 
>                 proxy_connect_timeout       300;
>                 proxy_send_timeout          300;
>                 proxy_read_timeout          300;
>                 send_timeout                300;   
> }
> 
> When i directly invoke target endpoint, its working fine.

The configuration as shown is clearly invalid.  Anyway, there are 
some things you may want to try:

- Try looking into error log.  In most cases, it contains details 
  on what goes wrong.

- Try to enable debug logging, see 
  http://nginx.org/en/docs/debugging_log.html.  It contains 
  details on all operations done by nginx, and can be used to 
  debug varios problems.

- Make sure your backend properly works via HTTP/1.0 and/or try 
  using "proxy_http_version 1.1" (if your backend is expected to 
  return chunked responses, it might be confused by HTTP/1.0).

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list