nrk/redis-lua

Question regarding redis-lua and luasocket

kostyl opened this issue · 7 comments

I've been actively using your redis-lua library in my company's project. It's cool and simple, thanks for sharing it. Primarily we use it in lua script which is a plugin for advanced MTA, we're using. The problem we're experiencing is quite a number of segfaults (perhaps in luasocket) while creating connections to redis. Have you experienced such a behaviour? Maybe you can point me to some known bugs of luascoket.

Another thing, I've made a minor patch to you library setting timeout(1) for tcp socket in connect method.

Any insight would be appreciated.

-Konstantin

nrk commented

Hi Konstantin,

I've never encountered any segfault so I'm not sure where the problem could be. Which operating system / architecture and which versions of Lua, LuaSocket and redis-lua are you using? Do these segfaults happen only when connecting to Redis?

Were using CentOS release 5.7 (Final) and custom build of Lua 5.1

thrLua 5.1.5 Copyright (C) 1994-2008 Lua.org, PUC-Rio
Copyright (C) 2008-2011 Message Systems, Inc

which is threaded lua... I know it's too much of unknowns for you, but still.. Segfaults happen when Redis becomes unresponsive for any reason.

nrk commented

Hmm could it be some incompatibility between your thrLua and LuaSocket that is triggered on certain conditions such as socket timeouts when Redis is unresponsive? Have you tried setting an higher timeout and see if anything changes?

Or maybe it has something to do with not thread-safe LuaSocket... I'll investigate this timeout thing more and let you know.

On 6 Apr 2012, at 13:28, Daniele Alessandri wrote:

Hmm could it be some incompatibility between your thrLua and LuaSocket that is triggered on certain conditions such as socket timeouts when Redis is unresponsive? Have you tried setting an higher timeout and see if anything changes?


Reply to this email directly or view it on GitHub:
#16 (comment)

nrk commented

Any update on this issue?

Yes. Lua-socket crashes under load of >12 requests per second in current stable version. They fixed it in release candidate.

-Konstantin

On 21 лип. 2012, at 11:57, Daniele Alessandrireply@reply.github.com wrote:

Any update on this issue?


Reply to this email directly or view it on GitHub:
#16 (comment)

nrk commented

I see, great to know that the cause was detected and fixed.

I'm closing this issue as it isn't really related to redis-lua, but I'll add a note in the readme since it could be a useful information for developers incurring similar problems.

Thanks.