Open Closed

Site is very slow when using Redis.com Cloud database #4620


User avatar
0
chris.b@mindmill.co.uk created
  • ABP Framework version: v6.0.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered

My application runs very slowly when using Redis Cloud database. When I use my local Redis, everything is fine, but as soon as I use Redis cloud, it can take up to 30 seconds for a call returning 12 basic objects.

I have not changes anything on my default Redis settings. My only change is updating the connection string in appsettings.json I am using the following mask [server].east-us-mz.azure.cloud.redislabs.com:[port],user=[userName],password=[password]

My site is running locally on a PC in the UK and the Redis database is on US-East Azure server, so I expect some latency, but 30 seconds is high.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Redis should be used as a high-performance cache, and it is not recommended to use it across the country.

    You can change the redis server closest to you.

  • User Avatar
    0
    chris.b@mindmill.co.uk created

    I have an API using the same Redis server serving requests at 100ms. I am aware that in a production environment the cache should be hosted closer.

    I am absolutely certain this is not the cause of the 35s return time for 12 objects. I am returning a list of countries with 4 properties. I only have 12 countries in the list. It is not a process heavy call, It returns 12 countries in 35 seconds. This happens on first load after which it comes down to 10s. Leaving it a while and returning to the page, the request is back up to 30+ seconds.

    I am not sure if there are additional connection checks that could be the cause or whether it may be the storing of data from the database into the cache.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please remove these lines from your program.cs file and reproduce the issue and share the full request logs. liming.ma@volosoft.com

    .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
    .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09