Fastcgi cache bypass empty body

Hi All,
currently we are using nginx with fastcgi_cache with php backend. For
some conditions php returns an empty body (that we can not find the
cause) but sends some headers and nginx thinks it is valid. So it stores
the file which results to an empty response for upcoming requests.

Cached response from backend is attached, is there a configuration
option to prevent this?

p.s. I changed the site name to in attachment.

On 6 Jan 2012 08h52 WET, [email protected] wrote:

Hi All, currently we are using nginx with fastcgi_cache with php
backend. For some conditions php returns an empty body (that we can
not find the cause) but sends some headers and nginx thinks it is
valid. So it stores the file which results to an empty response for
upcoming requests.

Perhaps using the embedded Lua module you can capture the response
and, for example, set ‘X-Accel-Expires: 0’, header for that request or
set a variable that is evaluated by fastcgi_cache_bypass.

then define:

fastcgi_cache_bypass $no_cache;

Check: http://wiki.nginx.org/HttpLuaModule#rewrite_by_lua

— appa

Hello!

On Fri, Jan 06, 2012 at 10:52:37AM +0200, Anıl Çetin wrote:

Hi All,
currently we are using nginx with fastcgi_cache with php backend. For
some conditions php returns an empty body (that we can not find the
cause) but sends some headers and nginx thinks it is valid. So it stores
the file which results to an empty response for upcoming requests.

Cached response from backend is attached, is there a configuration
option to prevent this?

No, there is no such option.

Maxim D.

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