Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown command type 'Q' (parser.c:155) #133

Open
viaweb3 opened this issue Nov 9, 2017 · 4 comments
Open

unknown command type 'Q' (parser.c:155) #133

viaweb3 opened this issue Nov 9, 2017 · 4 comments

Comments

@viaweb3
Copy link

viaweb3 commented Nov 9, 2017

phpredis

@doyoubi
Copy link
Contributor

doyoubi commented Nov 13, 2017

Thanks for reporting this.
Do you know which command you're sending to corvus when encountering this error?
Is your php client multi-threaded?
Does the same error message get printed again and again?
Need more information to figure out what's going on.

@viaweb3
Copy link
Author

viaweb3 commented Nov 20, 2017

php客户端是单线程短连接,会一直打印这个错误,由于是短连接,应该是socket关闭时的quit指令。

@doyoubi
Copy link
Contributor

doyoubi commented Nov 20, 2017

@pinguo-niulingyun 请问可以稳定复现吗? 求复现方法 (php版本, phpredis版本, 相关代码).

In case someone also has the same problem, it would be great if you can provide the way to reproduce it.

@jasonjoo2010
Copy link
Contributor

@pinguo-niulingyun

Yeah, the problem exists in function "redis_sock_disconnect", something like this:

`PHPAPI int redis_sock_disconnect(RedisSock *redis_sock TSRMLS_DC)
{
if (redis_sock == NULL) {
return 1;
}

redis_sock->dbNumber = 0;
if (redis_sock->stream != NULL) {
        if (!redis_sock->persistent) {
            redis_sock_write(redis_sock, "*\r\n$4\r\nQUIT\r\n" _NL, sizeof("*\r\n$4\r\nQUIT\r\n" _NL) - 1 TSRMLS_CC);
        }`

The original string is simply "QUIT" which is not obey the text protocol.
you should fix the source in your redis extension source code and recompile it to your dist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants