Upstream response is buffered to a temporary file

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? Will nginx clean out the cache, or do I
have
to do it manually?

Thanks.

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 D. [email protected]

Is there a reason to have it on?

Is there any recommended settings?

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 D.

saying that an “upstream response is buffered to a temporary file”. Is

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs