Recursion 检测到luaRedisGenericCommand()递归调用
我使用Recursion 检测到luaRedisGenericCommand()递归调用,recursion,lua,redis,Recursion,Lua,Redis,我使用Microsoft.Web.RedisessionStateProvider作为会话状态提供程序,它运行许多lua脚本。但我的应用程序捕获了以下异常: @用户_脚本:14:luaRedisGenericCommand()检测到递归调用。 你在用Lua调试钩子做有趣的事情吗 开发商表示: static int inuse = 0; /* Recursive calls detection. */ /* By using Lua debug hooks it is possible to
Microsoft.Web.RedisessionStateProvider
作为会话状态提供程序,它运行许多lua脚本。但我的应用程序捕获了以下异常:
@用户_脚本:14:luaRedisGenericCommand()检测到递归调用。
你在用Lua调试钩子做有趣的事情吗
开发商表示:
static int inuse = 0; /* Recursive calls detection. */
/* By using Lua debug hooks it is possible to trigger a recursive call
* to luaRedisGenericCommand(), which normally should never happen.
* To make this function reentrant is futile and makes it slower, but
* we should at least detect such a misuse, and abort. */
if (inuse) {
char *recursion_warning =
"luaRedisGenericCommand() recursive call detected. "
"Are you doing funny stuff with Lua debug hooks?";
redisLog(REDIS_WARNING,"%s",recursion_warning);
luaPushError(lua,recursion_warning);
return 1;
}
inuse++;
但我不知道如何检测这种递归,如何避免这种错误 回收应用程序池并清除Redis缓存,这样可以正常工作 回收应用程序池并清除Redis缓存,这样可以正常工作 您使用的是哪个Redis(服务器)版本?我使用的是Redis 3.0.503。这是一个老问题,但如果您在这方面仍然有问题,您应该包括您正在使用的lua脚本。对话继续:lua脚本在RedisConnetionWrapper中。cs:哪个Redis(服务器)您使用的是哪个版本?我使用的是Redis 3.0.503。这是一个老问题,但如果您在这方面仍然有问题,您应该包括您正在使用的lua脚本。对话在此处继续:lua脚本在RedisConnetionWrapper.cs中: