Hello!
On Mon, Jul 21, 2014 at 1:56 AM, Uğur Engin wrote:
> I implemented this module to our production,and transparent caching mode is
> working fine.However i am getting some error messages as below:
>
> 2014/07/21 11:34:08 [error] 7879#0: *28154401 upstream timed out (110:
> Connection timed out) while sending request to upstream, client:
> 195.175.75.126, server: st1.xxxx.com, request: "GET
> /akademi/v2/player/relatedBg.jpg HTTP/1.1", subrequest: "/memc_A", upstream:
> "memcached://10.10.11.63:11211", host: "st1.xxxx.com", referrer:
> "http://www.xxxx.com/tiramisu-nasil-yapilir"
>
The timeout errors usually happen when
1. your memcached server cannot catch up with some traffic peaks. you
can monitor your memcached server's CPU usage at peak times. If it is
the case, you should scale your memcached backend to multiple nodes
(or more nodes).
2. the packet may get dropped along the kernel network stack or on the
wire and your timeout setting in your Lua code (i.e., the client side)
is too short to allow TCP packet re-transmission. you can trace in the
kernel network stack to be sure (with tools like systemtap). The
packet retransmission delay is usually something like 3s or 2s while
your timeout settings on the client side are just 100ms.
3. your nginx may be blocking on something that prevents its event
loop to process IO events in time. You can use the following tools to
be sure when the timeout errors are happening:
https://github.com/openresty/nginx-systemtap-toolkit#sample-bt-off-cpu
and https://github.com/openresty/stapxx#epoll-loop-blocking-distr