upstream response is buffered to a temporary file
Maxim Dounin
mdounin at mdounin.ru
Wed Mar 14 14:56:38 UTC 2012
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 at 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 at daoine.org
> >
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> >
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list