Hello!
On Tue, Apr 15, 2014 at 2:23 AM, Pahud Hsieh wrote:
> 我在AWS上面部署OpenResty目前使用版本是 ngx_openresty-1.4.3.3
>
你使用的 OpenResty 版本很老,是五个多月前的版本。建议升级到最新版。
> 然後nginx error.log出現大量這種錯誤
>
[...]
> 2014/04/15 17:02:49 [error] 1773#0: *3390 lua tcp socket read timed out,
> client: 10.0.0.57, server: localhost, request: "GET /api/listen?json
> HTTP/1.1"
[...]
> 2014/04/15 17:03:19 [error] 1918#0: *4825 [lua] listen.lua:47:
> redis_keepalive(): [ERROR]failed to set redis keepalive: connection in
> dubious state, client: 10.0.0.57, server: localhost, request: "GET
> /api/listen/?json HTTP/1.1"
>
> 有些甚至hmget()操作出現了timeout
> 2014/04/15 17:10:04 [error] 1774#0: *8908 [lua] fetch.lua:120: has_latest():
> hmget failed: timeout, client: 10.0.0.57, server: localhost
>
> 請問在這樣規模的併發下,是否有什麼參數需要調整或是注意的?
>
谢对照 lua-resty-redis 文件中的“Check List for Issues”一节进行调整和诊断:
https://github.com/agentzh/lua-resty-redis#check-list-for-issues
> 目前使用的redis是AWS ElastiCache redis 2.8.6 預設的設置。
>
Redis 的默认配置是比较保守的,应当进行相应的调整(见上面给出的文档链接)。
Regards,
-agentzh