Memcached_gzip_flag

I’m running nginx 1.3.9 with memcached_pass and I have set
memcached_gzip_flag in an attempt to serve gzipped content directly from
memcached (mainly to save memory on my memcached processes, which get
pretty
large). My gzip flag is being detected properly–nginx adds the
Content-Encoding header–but I get 330 errors saying the content
encoding is
incorrect. Every test I’ve made indicates that the data I am storing is
valid gzipped data. Does anyone have any advice on how to troubleshoot
this?

Thanks so much!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233807,233807#msg-233807

PS: I’m writing the data using Dalli (https://github.com/mperham/dalli)
with
compression on and raw set to true. Dalli sets the bitmask for
compression
to 0x2 (all of this appears to be working correctly).

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233807,233808#msg-233808

Hello!

On Mon, Dec 10, 2012 at 11:16:54AM -0500, tkellen wrote:

PS: I’m writing the data using Dalli (https://github.com/mperham/dalli) with
compression on and raw set to true. Dalli sets the bitmask for compression
to 0x2 (all of this appears to be working correctly).

As far as I can tell from [1], it stores zlib stream, not gzip
(which is a different format on top of the same compression
algorithm, see zlib.h for details). It likely can be easily
adapted to use gzip though.

[1] https://github.com/mperham/dalli/blob/master/lib/dalli/compressor.rb


Maxim D.
http://nginx.com/support.html

On Monday 10 December 2012 20:16:54 tkellen wrote:

PS: I’m writing the data using Dalli (https://github.com/mperham/dalli)
with compression on and raw set to true. Dalli sets the bitmask for
compression to 0x2 (all of this appears to be working correctly).

But Dalli for compressed data uses zlib wrapper instead of gzip one.

wbr, Valentin V. Bartenev


http://nginx.com/support.html
http://nginx.org/en/donation.html

Right you are. Thanks for the second set of eyes! I’ve submitted a PR
to
Dalli to add a gzip compressor and I’m using a custom one now. It’s
working
wonderfully.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233807,233816#msg-233816

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