csredis icon indicating copy to clipboard operation
csredis copied to clipboard

Unexpected end of stream; expected type 'Bulk'; data = ''

Open wt5wt opened this issue 5 years ago • 12 comments

线上环境,升级完 csredis 3.6.1 ,后,开始报这个错误,麻烦能看看怎么解决么,谢谢

at CSRedis.CSRedisClient.GetAndExecute[T](RedisClientPool pool, Func2 handler, Int32 jump, Int32 errtimes) at CSRedis.CSRedisClient.ExecuteScalar[T](String key, Func3 hander) at CSRedis.CSRedisClient.HGet[T](String key, String field) at RedisHelper`1.HGet[T](String key, String field) at Jiacloud.Platform.Biz.ComboBoxBiz.GetDicData(String param, String TenantId, AccountDto accountDto) at Jiacloud.Platform.WebAPI.Controllers.ComboBoxController.GetComboBoxAsync(String type, String param, String TenantId) in D:\Projects\Jxt.Platform\Service\Jiacloud.Platform.WebAPI\Controllers\ComboBoxController.cs:line 118 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

wt5wt avatar Apr 15 '20 03:04 wt5wt

升级之前是什么版本,升级之前正常吗?

2881099 avatar Apr 15 '20 03:04 2881099

升级之前是什么版本,升级之前正常吗?

升级之前正常,升级之前版本是 3.0.64

wt5wt avatar Apr 15 '20 03:04 wt5wt

有没有办法重现问题,试试 3.6.2 版本

2881099 avatar Apr 15 '20 03:04 2881099

redis 链接,加了这些配置,看看合理么poolsize=600,testcluster=false,tryit=2,preheat=50,syncTimeout=3000,connectTimeout=3000 待会升级下 3.6.2 试试看

wt5wt avatar Apr 15 '20 03:04 wt5wt

redis-server 是什么环境

syncTimeout=3000 这个时间太短了吧,3秒超时

2881099 avatar Apr 15 '20 04:04 2881099

redis-server 是什么环境

syncTimeout=3000 这个时间太短了吧,3秒超时

syncTimeout 调整到 10000 了,升级到3.6.2 后,window 服务器上,没有再出这个错误了,但我们还有发布到linux 上,偶尔会出 “Unexpected end of stream; expected type 'Int'; data = ''” 这个错误

wt5wt avatar Apr 15 '20 06:04 wt5wt

这个跟我原来遇到的错误是一样的啊

mrh520 avatar Apr 15 '20 06:04 mrh520

redis-server 是什么环境 syncTimeout=3000 这个时间太短了吧,3秒超时

syncTimeout 调整到 10000 了,升级到3.6.2 后,window 服务器上,没有再出这个错误了,但我们还有发布到linux 上,偶尔会出 “Unexpected end of stream; expected type 'Int'; data = ''” 这个错误

能整理个重现的demo发给我吗

2881099 avatar Apr 15 '20 07:04 2881099

图片 redis 内容,使用的是hash, 内容大概如上图,json 的字符串,直接使用 RedisHelper.HGet<List<ComboBoxDto>>(key, x) 这样读取,本地无法复现这个错误,发到线上会产生这种问题

wt5wt avatar Apr 15 '20 09:04 wt5wt

这个跟我原来遇到的错误是一样的啊

后来解决了么

wt5wt avatar Apr 15 '20 09:04 wt5wt

没有进一步跟进了

mrh520 avatar Apr 15 '20 09:04 mrh520

我这边是因为内存碎片问题导致性能问题报这个错误的

liftlei avatar Sep 13 '22 06:09 liftlei