Hi everyone,
I want to cache png images with memcached and serve with nginx.
I configured nginx and i could write images to memcached. When i try to
read this images from cache with memcached client i can.
But when i try to read this images from nginx, broken images comes.
For example : I put byte array to memcached with 115832 bytes but when i
try to read get 114940 bytes.
Anyone has idea?
Thanks
Posted at Nginx Forum:
Hi,
i want to do the same setup, could you give me your configuration so
that i can see how it works?
thanks
alex
I did the configuration that is explained in this site;
Posted at Nginx Forum:
Hello!
On Thu, Apr 19, 2012 at 08:31:48AM -0400, utahemre wrote:
try to read get 114940 bytes.
Anyone has idea?
Usually it happens due to compressed content being put into
memcached by a memcached client.
Maxim D.
I focused same topic that you are said about.
I am using spymemcached client to write the cache and nginx read wrong
data.
After your reply i tried to write with whalin memcached client and tried
to read both spymemcached and nginx. Neither nginx nor spymemcached can
read data from cache.
Does nginx have any configuration that i configure which memcached
client nginx use? Or anyone know which memcached client can run with
nginx properly?
Emre
Posted at Nginx Forum:
Hello!
On Thu, Apr 19, 2012 at 10:56:21AM -0400, utahemre wrote:
client nginx use? Or anyone know which memcached client can run with
nginx properly?
More or less any memcached client can work properly with nginx,
you just need to figure out how to write raw data into memcached
from your client, i.e. without compression, serialization and so
on. In case of Perl clients it’s more or less default behaviour
for all modules I know (Cache::Memcached, Cache::Memcached::Fast)
as long as you write scalars to memcached. No idea about Java.
Maxim D.
Hi
My problem has been solved.
If i put any image to cache with java spymemcached client, nginx get
broken images. After that i changed my java client to whalin memcached
client.
Now i am putting images with java whalin memcached client and i can get
images with nginx properly.
But here is a important trick. You have to set SanitizeKeys attribute
in whalin memcached client to false.
Regards
Posted at Nginx Forum: