提交 63fd1399 编写于 作者: A antirez

show initial querybuf bytes on querybuf overflow.

上级 e7ef418c
...@@ -911,9 +911,12 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) { ...@@ -911,9 +911,12 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
return; return;
} }
if (sdslen(c->querybuf) > server.client_max_querybuf_len) { if (sdslen(c->querybuf) > server.client_max_querybuf_len) {
sds ci = getClientInfoString(c); sds ci = getClientInfoString(c), bytes = sdsempty();
redisLog(REDIS_WARNING,"Closing client that reached max query buffer length: %s", ci);
bytes = sdscatrepr(bytes,c->querybuf,64);
redisLog(REDIS_WARNING,"Closing client that reached max query buffer length: %s (qbuf initial bytes: %s)", ci, bytes);
sdsfree(ci); sdsfree(ci);
sdsfree(bytes);
freeClient(c); freeClient(c);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册