Hello!
On Fri, Jul 4, 2014 at 7:40 AM, Yann Coleu wrote:
> location = /memc {
> internal;
>
> set $memc_key $query_string;
> set $memc_exptime 1d;
This line is guilty. $memc_exptime only expects an integer value for
seconds. No magic like "1d" is allowed here. So ngx_memc returns a 400
error page in your srcache_store subrequests without even talking to
memcached.
Change that line to
set $memc_exptime 86400;
fixes the issue on my side. And memcached server reports the following
under -vv:
<30 new auto-negotiating client connection
30: Client using the ascii protocol
<30 get /t2
>30 END
<30 connection closed.
<30 new auto-negotiating client connection
30: Client using the ascii protocol
<30 set /t2 0 86400 48
>30 STORED
<30 connection closed.
Just as expected.
To make debugging such configuration mistakes easier, I've just
committed a patch to ngx_srcache and ngx_memc's git master branches,
respectively, which will now give helpful error messages in your
example:
[error] 2265#0: *5 variable "$memc_exptime" takes invalid value: 1d, ...
[error] 2265#0: *5 srcache_store subrequest failed: rc=400 status=0, ...
Thank you for the report.
Best regards,
-agentzh