Welcome! Log In Create A New Profile

Advanced

Re: upstream response is buffered to a temporary file

Maxim Dounin
March 14, 2012 10:58AM
Hello!

On Wed, Mar 14, 2012 at 08:52:50AM -0400, Bai Shen wrote:

> Is there a reason to have it on?

Yes, the default "proxy_buffering on" is appropriate for most
cases. It ensures minimal processing overhead and takes slow
clients off your upstream servers (which are in many cases
process-based and can't handle many connections).

The "proxy_buffering off" is only appropriate in specific
situations like long-running connections where you send small
chunks of data periodically and need them to be immediately
delivered to client(s).

> Is there any recommended settings?

The default is good enough. If it doesn't fit you needs, you may
consider tuning proxy_buffers and/or proxy_max_temp_file_size.

If you don't want to hit disk in any case, you may use

proxy_max_temp_file_size 0;

which disables disk buffering completely. Note that for obvious
reasons it will limit nginx ability to offload slow clients from
your backends.

Maxim Dounin

>
> On Tue, Mar 13, 2012 at 7:49 PM, Francis Daly <francis@daoine.org> wrote:
>
> > On Tue, Mar 13, 2012 at 09:36:14AM -0400, Bai Shen wrote:
> >
> > Hi there,
> >
> > > I installed nginx with the defaults. I'm using it as a reverse proxy,
> > but
> > > not caching. However, I keep getting a lot of entries in the log file
> > > saying that an "upstream response is buffered to a temporary file". Is
> > > there a way to turn this off?
> >
> > If your upstream is from a proxy_pass directive, have a look at
> > http://www.nginx.org/r/proxy_buffering and linked content.
> >
> > > Will nginx clean out the cache, or do I have
> > > to do it manually?
> >
> > This is a buffer, not a cache, and (I believe) you shouldn't have to do
> > anything manually about it.
> >
> > All the best,
> >
> > f
> > --
> > Francis Daly francis@daoine.org
> >
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> >

> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upstream response is buffered to a temporary file

Bai Shen March 13, 2012 09:38AM

Re: upstream response is buffered to a temporary file

Francis Daly March 13, 2012 07:50PM

Re: upstream response is buffered to a temporary file

Bai Shen March 14, 2012 08:54AM

Re: upstream response is buffered to a temporary file

Maxim Dounin March 14, 2012 10:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
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