Comments (26)
怎么重现问题。我测试没发现问题
from csredis.
这个问题很奇怪,Windows上没有出现,Linux频繁出现,目前还没发现100%复现的方式..
from csredis.
keys 查的参数是什么?
预计返回数据多少条,中间有没有特别长的keyname?
同样的参数,在redis-cli执行,是否正常?
截图多收集相关数据
from csredis.
public void ExpectType(RedisMessage expectedType)
{
RedisMessage type = ReadType();
if ((int)type == -1)
throw new EndOfStreamException("Unexpected end of stream; expected type '" + expectedType + "'");
if (type != expectedType)
throw new RedisProtocolException(String.Format("Unexpected response type: {0} (expecting {1})", type, expectedType));
}
服务端返回-1,才会出这个错误
from csredis.
不是服务端返回-1,应该是流结束了..
查询的参数 一般为 AX*这样的. 长度不超过64.
cli中查询很正常.
from csredis.
我这里没办法重现问题啊,下面的代码测试没报错。
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();
}
from csredis.
你那里可以必报错误吗?
from csredis.
会不会是因为redis的timeout配置的原因?我这边在将timeout配置为非0的值的时候也会遇到这样的问题
from csredis.
经常遇到这个问题....不管是windows和linux下
from csredis.
Unable to read data from the transport connection: 你的主机中的软件中止了一个已建立的连接。. ---> System.Net.Sockets.SocketException: 你的主机中的软件中止了一个已建立的连接。
Unexpected end of stream; expected type 'Bulk'
from csredis.
连接终止了,然后跟着读取数据不正确。
可下载源码搜索【Unexpected end of stream; expected type】,只有一个地方
from csredis.
我也遇到同样的问题,目前可以确定的是我这边使用HGetAllAsync方法是必现的,改为HGetAll不出现此问题,或许从异步方面排查会有线索,Linux服务器、3.0.53版本
from csredis.
使用 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)
from csredis.
@JimReal @yescent 是必然出现的吗?增加 tryit=1 参数试试
from csredis.
增加 tryit=1 还是报错
系统为linux,timeout设置为0
from csredis.
是否开启了 ssl
from csredis.
没有开启
from csredis.
使用同步方法呢?
from csredis.
是 HGetAllAsync 还是 HGetAll 出的错?
from csredis.
HGetAll
from csredis.
代码发出来看下
from csredis.
var csredis = new CSRedisClient(null,connectionString);
//初始化 RedisHelper
RedisHelper.Initialization(csredis);
public class RedisDb: IRedisDb
{
public List<T> HashGetAll<T>(string key)
{
List<T> list = new List<T>();
try
{
return RedisHelper.HGetAll<T>(key)?.Select(x => x.Value).ToList();
}
catch (Exception) { }
return list;
}
}
from csredis.
var res = RedisHelper.HGetAllAsync(string.Format(gxin_users_{0}, id));
id是一个guid。
from csredis.
is there a solution ?we run into the same Dilemma.
from csredis.
There is nothing for the time being,you can try async or not async in two ways.
from csredis.
Did redis-server turn SSL on?
from csredis.
Related Issues (20)
- 3.8.671 vs 3.8.668 HOT 1
- TONG RDS(国产信创) 哨兵有问题 HOT 9
- 请问在哪里查看版本更新日志 HOT 2
- Thread CurrentCulture csredis hash exception with docker container HOT 15
- Linux 下面 Connection timed out.问题有办法解决吗? HOT 1
- 读取redis抛InvalidCastException HOT 1
- cacheshell哈希表不支持设置-1永久有效 HOT 3
- 请问可以监听redis键过期事件吗 HOT 1
- 请问一下有没有方法取消管道操作 HOT 4
- 这块每次 new byte对GC不太友好,还有读取的时候,建议使用 ArrayPool了
- 链接池中数量
- SlowLogGetAsync HOT 4
- csrediscore is missing NuGet package README file
- 关于前缀的问题 HOT 1
- 哨兵 Master 重新选举后出现 Connection was not opened HOT 3
- ReadLine()判断不严谨,导致内存暴增问题 HOT 4
- feat 增加获取锁间隔
- Status unavailable, waiting for recovery. Connect to server timeout HOT 4
- 内网环境下Status unavailable, waiting for recovery. Connect to server timeout HOT 2
- 内网环境下Status unavailable, waiting for recovery. Connect to server timeout HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csredis.