Open Closed

Redis Error on large data query #2796


User avatar
0
ryan.rader@tibercapital.com created
  • ABP Framework version: v5.1.2

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace: StackExchange.Redis.RedisTimeoutException HResult=0x80131505 Message=Timeout performing HMGET (5000ms), inst: 424, qu: 61, qs: 0, aw: True, bw: Starting, rs: ReadAsync, ws: Idle, in: 0, in-pipe: 0, out-pipe: 0, serverEndpoint: 127.0.0.1:6379, mc: 1/1/0, mgr: 10 of 10 available, clientName: DESKTOP-2DFLJPM, IOCP: (Busy=0,Free=1000,Min=16,Max=1000), WORKER: (Busy=51,Free=32716,Min=16,Max=32767), v: 2.2.4.27433 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts) Source=StackExchange.Redis StackTrace: at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2809 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in //src/StackExchange.Redis/RedisBase.cs:line 54 at StackExchange.Redis.RedisDatabase.HashGet(RedisKey key, RedisValue[] hashFields, CommandFlags flags) in //src/StackExchange.Redis/RedisDatabase.cs:line 324 at Microsoft.Extensions.Caching.StackExchangeRedis.RedisExtensions.HashMemberGet(IDatabase cache, String key, String[] members) at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAndRefresh(String key, Boolean getData) at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Get(String key) at Volo.Abp.Caching.DistributedCache2.Get(TCacheKey key, Nullable1 hideErrors, Boolean considerUow)

  • Steps to reproduce the issue:"

I have a contractor GetListAsync which returns contractors. The method was generated from the abp suite. I need to get all the records which currently is about 800. In the constructor of the class I am using this code

LimitedResultRequestDto.DefaultMaxResultCount = 1000; LimitedResultRequestDto.MaxMaxResultCount = 1000;

When I run the code, I am getting a redis error (above). How can I fix this so we do not get an error with redis?


3 Answer(s)
  • User Avatar
    0
    Rrader30 created

  • User Avatar
    0
    ryan.rader@tibercapital.com created

    So if I set Redis, IsEnabled: false in configuration this appears to stop and things seem to work. My question, how can I enable redis and not get this error? Is there a way to turn redis off for specific queries?

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    As I see, this is a typical Redis timeout error. If the redis is deployed to a different server, that means you have to transfer entire data from redis to app, or app to redis and with 1000 count of data it might be costful. You can configure a bigger timeout value for redis or optimize the data that you transferred.

    I can't find an exact answer for that. I don't know how you use the Redis. You can share Steps to reproduce the issue or provide a sample project so we can investigate if the problem is related to ABP or not but it seems it's not related to ABP, it seems it's a common Redis usage issue.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19