-
Notifications
You must be signed in to change notification settings - Fork 412
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
System.IO.EndOfStreamException: Unexpected end of stream; expected type 'MultiBulk' #35
Comments
怎么重现问题。我测试没发现问题 |
这个问题很奇怪,Windows上没有出现,Linux频繁出现,目前还没发现100%复现的方式.. |
keys 查的参数是什么? 截图多收集相关数据 |
服务端返回-1,才会出这个错误 |
不是服务端返回-1,应该是流结束了.. |
我这里没办法重现问题啊,下面的代码测试没报错。 for (var a = 0; a < 50; a++) {
new Thread(() => {
for (int i = 0; i < 100; i++) {
Task.Run(async () => {
try {
var keysall = RedisHelper.Keys("*");
var keys = RedisHelper.Keys("lkjsdglkjskldgk*slkdgjlksdjgkl");
Console.WriteLine(keys.Length + "/" + keysall.Length);
} catch (Exception ex) {
Console.WriteLine(ex);
}
await Task.Delay(200);
}).Wait();
}
}).Start();
} |
你那里可以必报错误吗? |
会不会是因为redis的timeout配置的原因?我这边在将timeout配置为非0的值的时候也会遇到这样的问题 |
经常遇到这个问题....不管是windows和linux下 |
Unable to read data from the transport connection: 你的主机中的软件中止了一个已建立的连接。. ---> System.Net.Sockets.SocketException: 你的主机中的软件中止了一个已建立的连接。 Unexpected end of stream; expected type 'Bulk' |
连接终止了,然后跟着读取数据不正确。 可下载源码搜索【Unexpected end of stream; expected type】,只有一个地方 |
我也遇到同样的问题,目前可以确定的是我这边使用HGetAllAsync方法是必现的,改为HGetAll不出现此问题,或许从异步方面排查会有线索,Linux服务器、3.0.53版本 |
使用 HGetAll方法时候出现,csreids 错误【10.0.0.36:6379/0】:Unexpected end of stream; expected type 'MultiBulk'; data = at CSRedis.CSRedisClient.GetAndExecute[T](RedisClientPool pool, Func`2 handler, Int32 jump, Int32 errtimes) |
是否开启了 ssl |
没有开启 |
使用同步方法呢? |
是 HGetAllAsync 还是 HGetAll 出的错? |
HGetAll |
代码发出来看下 |
|
|
is there a solution ?we run into the same Dilemma. |
There is nothing for the time being,you can try async or not async in two ways. |
Did redis-server turn SSL on? |
调用RedisHelper.Keys频繁抛出异常.
The text was updated successfully, but these errors were encountered: