Welcome! Log In Create A New Profile

Advanced

Gzipping proxied content after using subs_filter fails

August 09, 2012 05:28PM
As the title says, I'm having an issue with gzipping proxied web pages after using subs_filter. It doesn't always happen, but it looks like whenever a page exceeds the size of one of my proxy_buffers I get an error in the error log saying:

[alert] 18544#0: *490084 deflate() failed: 2, -5 while sending to client, client: xxx.xxx.xxx.xxx, server: www.test.com, request: "GET / HTTP/1.1", upstream: "http://xxx.xxx.xxx.xxx:80/", host: "www.test.com", referrer: "http://xxx.xxx.xxx.xxx/"

The page, without any compression, is roughly 80k. When I boost my proxy_buffers to 100k the page loads fine. When it is below the 80k of the page, I only receive a partial version of the page (roughly 5k, whether proxy_buffer_size is set to 4k or 8k).

Turning off gzip serves the entire page as does disabling the subs_filter commands.

Is there any workaround/fix for this outside of just boosting the proxy_buffers value so that it exceeds every possible text/html page I'm serving?

In case they're helpful, my normal proxy and gzip settings are:

proxy_cache_use_stale updating error timeout invalid_header http_500 http_502 http_504;
proxy_cache_valid 60m;
proxy_redirect off;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 120;
proxy_buffers 8 16k;
proxy_buffer_size 16k;
proxy_busy_buffers_size 64k;
proxy_cache_key $host$request_uri$is_args$args;

gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 8;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";

Thanks!
Subject Author Posted

Gzipping proxied content after using subs_filter fails

abstein2 August 09, 2012 05:28PM

Re: Gzipping proxied content after using subs_filter fails

Maxim Dounin August 10, 2012 05:58AM

Re: Gzipping proxied content after using subs_filter fails

姚伟斌 August 12, 2012 10:36PM

Re: Gzipping proxied content after using subs_filter fails

abstein2 August 13, 2012 01:50AM

Re: Gzipping proxied content after using subs_filter fails

姚伟斌 August 13, 2012 02:02AM

Re: Gzipping proxied content after using subs_filter fails

bigbenarmy August 13, 2012 06:16AM

Re: Gzipping proxied content after using subs_filter fails

abstein2 August 13, 2012 01:51PM

Re: Gzipping proxied content after using subs_filter fails

姚伟斌 August 16, 2012 11:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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