Activities of "dev3.advantiss"

hi

I guess it's slow because they connect to remote Redis. Can you try with local Redis for the test?

Local redis works fine. But I get some error messages as


[17:38:48 DBG] Not found in the cache: pn:U,pk:1e0b14a2-a29f-d3cd-58d6-3a05c4c8341a,n:Dibl.Cases [17:38:48 DBG] Getting all granted permissions from the repository for this provider name,key: U,1e0b14a2-a29f-d3cd-58d6-3a05c4c8341a [17:38:48 DBG] Setting the cache items. Count: 107 [17:38:48 WRN] ERR Error running script (call to f_3915ee22fda531a1d5661f2523d0443fd35ff0a4): @user_script:2: @user_script: 2: Wrong number of args calling Redis command From Lua script StackExchange.Redis.RedisServerException: ERR Error running script (call to f_3915ee22fda531a1d5661f2523d0443fd35ff0a4): @user_script:2: @user_script: 2: Wrong number of args calling Redis command From Lua script at Volo.Abp.Caching.StackExchangeRedis.AbpRedisCache.SetManyAsync(IEnumerable1 items, DistributedCacheEntryOptions options, CancellationToken token) at Volo.Abp.Caching.DistributedCache2.<>c__DisplayClass54_0.<<SetManyAsync>g__SetRealCache|0>d.MoveNext() [17:38:48 DBG] Finished setting the cache items. Count: 107 [17:38:48 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Dibl.Cases [17:38:48 DBG] Not found in the cache: pn:R,pk:admin,n:Dibl.Cases [17:38:48 DBG] Getting all granted permissions from the repository for this provider name,key: R,admin [17:38:48 DBG] Setting the cache items. Count: 107


What is it?

Hi

I have some problem with performance after enabled Redis. I use Redis in Azure.

After click refresh my site's pages opening very slowly.

I created new project and enable Redis on it - I have the same problems: Refresh Home page takes 15 seconds

I run website locally, but if website from Azure use Redis from Azure litle bit faster than locally but very slow for users.

I save video with that problem and some code where I config Redis: https://drive.google.com/drive/folders/1RebzN9I4zrZ1DSq_qHjN4YGjahRUCP2B?usp=sharing

I have got problem with Redis cache Many values cache in Redis and get after load any page or refesh page...

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes

All languages, permissions and settings are cached I need to cache some entities only.

Is it possible to separate ways of storing data?

  • ABP data (for the entire site) was stored in memory as before
  • Сached data only for users

What do I need to do with this problem?

.................... 15:26:01.917 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpValidation_en" "1200"15:26:01.957 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "absexp" "sldexp" "data"15:26:01.998 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "1200"15:26:02.038 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "absexp" "sldexp" "data"15:26:02.079 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "1200"15:26:02.119 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "absexp" "sldexp" "data"15:26:02.159 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "1200"15:26:02.200 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "absexp" "sldexp" "data"15:26:02.240 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "1200"15:26:02.338 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.379 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "1200"15:26:02.427 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.468 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "1200"15:26:02.515 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.556 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "1200"15:26:04.963 [0 188.163.21.143:58665] "info"15:26:05.312 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.352 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "1200"15:26:05.401 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.443 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "1200"15:26:05.462 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Cases" "absexp" "sldexp" "data"15:26:05.490 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.502 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Cases" "1200" ....................

Best Regards Advantiss.

Hi

I have upgrade ABP version to 5.3.3, and get same results as use 4.3.3 version. Maybe my setting for Redis are wrong... Could you review my code and find mistakes or problems?

I added code for Redis in RealtorHttpApiHostModule private void ConfigureCache(ServiceConfigurationContext context)

hi

There will be many optimizations in the new versions, if you can upgrade this is the best solution.

Do you have any document for upgrade ABP version?

If I use local redis, site will work good I try to use redis in Azure and another machine - I have problems with performance...

hi

It seems to be a network issue. please check the network status between the two computers(website and redis)

I have tested connection with site to redis(used redis-benchmark) and I have same results on different points. I have good results for ABP version 5.3.3, but bad results for ABP version 4.3.3.

In version 4.3.3 ABP caches all entities, but it does not need for me. Maybe in 4.3.3 does not work GetManyAsync and SetManyAsync functionality? I don't know.

Please make your repository Private first.

I have changed repository to Private

I tried to use redis, but I got to decrease performance Site works very slowly and all entities are cached. I do not need cache all entities. I created new project with ABP version 5.3.1 - redis works fine If I use local redis, site will work good I try to use redis in Azure and another machine - I have problems with performance...

I created simple project with redis. Redis test project

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
2022-07-21 20:37:54.876 +03:00 [DBG] CORS request made for path: /api/abp/application-configuration from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
2022-07-21 20:37:54.876 +03:00 [INF] No CORS policy found for the specified request.
2022-07-21 20:37:54.882 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2022-07-21 20:37:54.889 +03:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
2022-07-21 20:37:54.926 +03:00 [INF] Executing AbpApplicationConfigurationAppService.GetAsync()...
2022-07-21 20:37:55.612 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:FeatureManagement.ManageHostFeatures,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles.Create,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles.Update,pn:U,pk:0dd8a970-4a2a...........................................................................d8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Create,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Edit,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Delete
2022-07-21 20:37:55.732 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: U,0dd8a970-4a2a-53fd-4117-39fcf9f8b8be
2022-07-21 20:37:55.811 +03:00 [DBG] Setting the cache items. Count: 68
2022-07-21 20:37:55.890 +03:00 [DBG] Finished setting the cache items. Count: 68
2022-07-21 20:37:55.903 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Ro..................................................tes.Edit,pn:R,pk:admin,n:Realtor.RealEstates.Delete
2022-07-21 20:37:55.961 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: R,admin
2022-07-21 20:37:55.974 +03:00 [DBG] Setting the cache items. Count: 68
2022-07-21 20:37:56.047 +03:00 [DBG] Finished setting the cache items. Count: 68
2022-07-21 20:37:56.054 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Realtor_App,n:AbpIdentity.UserLookup
2022-07-21 20:37:56.108 +03:00 [DBG] Not found in the cache: pn:C,pk:Realtor_App,n:AbpIdentity.UserLookup
2022-07-21 20:37:56.112 +03:00 [DBG] Getting all granted permissions from the repository for this provider name,key: C,Realtor_App
2022-07-21 20:37:56.123 +03:00 [DBG] Setting the cache items. Count: 77
2022-07-21 20:37:56.203 +03:00 [DBG] Finished setting the cache items. Count: 77
2022-07-21 20:37:56.218 +03:00 [INF] STOPWATCH ApplicationAuthConfigurationDto() - 1288
2022-07-21 20:37:56.221 +03:00 [INF] STOPWATCH GetFeaturesConfigAsync() - 1
2022-07-21 20:37:56.333 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 1 - 109
2022-07-21 20:38:04.545 +03:00 [DBG] Executing HealthCheck collector HostedService.
2022-07-21 20:38:04.547 +03:00 [INF] Start processing HTTP request GET "https://localhost:44358/health-status"
2022-07-21 20:38:04.547 +03:00 [INF] Sending HTTP request GET "https://localhost:44358/health-status"
2022-07-21 20:38:04.548 +03:00 [INF] Request starting HTTP/1.1 GET https://localhost:44358/health-status - -
2022-07-21 20:38:04.897 +03:00 [INF] Executing endpoint 'Health checks'
2022-07-21 20:38:04.906 +03:00 [INF] Executed endpoint 'Health checks'
2022-07-21 20:38:04.906 +03:00 [INF] Received HTTP response headers after 359.4587ms - 200
2022-07-21 20:38:04.906 +03:00 [INF] End processing HTTP request after 359.674ms - 200
2022-07-21 20:38:04.909 +03:00 [INF] Request finished HTTP/1.1 GET https://localhost:44358/health-status - - - 200 - application/json 360.9457ms
2022-07-21 20:38:04.910 +03:00 [DBG] HealthReportCollector - health report execution history saved.
2022-07-21 20:38:04.910 +03:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2022-07-21 20:38:04.911 +03:00 [DBG] HealthReportCollector has completed.
2022-07-21 20:38:04.911 +03:00 [DBG] HealthCheck collector HostedService executed successfully.
**2022-07-21 20:38:13.051 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 16718**
2022-07-21 20:38:13.058 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 3 - 6
2022-07-21 20:38:13.058 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - 16834
2022-07-21 20:38:13.426 +03:00 [INF] STOPWATCH GetSettingConfigAsync() - 362
2022-07-21 20:38:13.838 +03:00 [INF] STOPWATCH GetAsync() - 18912
2022-07-21 20:38:13.838 +03:00 [INF] Executed AbpApplicationConfigurationAppService.GetAsync().
2022-07-21 20:38:13.852 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
**2022-07-21 20:38:13.884 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 18994.6453ms**

I have insert AbpApplicationConfigurationAppService where I insert some STOPWATCHs I have got ~19sec for AbpApplicationConfigurationAppService.GetAsync() and all other queries for backend has more time.

Why is it appear? What can I do with this problem?

Best regards, Advantiss Inc

hi

Can you try the test code in the latest template?

If still slow please share the project with me liming.ma@volosoft.com

Hi, I tried to create new project with using angular(from "https://abp.io/get-started"), but I have got error after "npm install" and "npm start": [error] Error: ENOENT: no such file or directory, lstat 'F:\Training\TestRedis1\angular\node_modules@swimlane' at Object.realpathSync (node:fs:2486:7) at resolveGlobalStyles (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\webpack\configs\styles.js:60:31) at getStylesConfig (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\webpack\configs\styles.js:92:70) at F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\builders\dev-server\index.js:137:43 at F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\utils\webpack-browser-config.js:76:16 at generateWebpackConfig (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\utils\webpack-browser-config.js:65:40) at async generateBrowserWebpackConfigFromContext (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\utils\webpack-browser-config.js:127:20) at async generateI18nBrowserWebpackConfigFromContext (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\utils\webpack-browser-config.js:74:20) at async setup (F:\Training\TestRedis1\angular\node_modules@angular-devkit\build-angular\src\builders\dev-server\index.js:134:47)

I installed @swimlane, but after that I have got another errors

Error: node_modules/@abp/ng.theme.shared/node_modules/@swimlane/ngx-datatable/lib/services/scrollbar-helper.service.d.ts:12:26 - error TS2694: Namespace '"F:/Training/TestRedis1/angular/node_modules/@abp/ng.theme.shared/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'. 12 static ɵprov: ɵngcc0.ɵɵInjectableDeclaration<ScrollbarHelper>;

Best regards, Advantiss Inc

I have tried to use redis, but I got to decrease performance

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
2022-07-06 22:01:21.840 +03:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
2022-07-06 22:01:22.573 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:FeatureManagement.ManageHostFeatures,pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:AbpIdentity.Roles,pn:U,pk:f164aa86-f536-867d-4c7f-3a........................................................
2022-07-06 22:01:22.651 +03:00 [DBG] Not found in the cache: pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:FeatureManagement.ManageHostFeatures,pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:AbpI..................................................................
2022-07-06 22:01:22.671 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: U,f164aa86-f536-867d-4c7f-3a049335a0ec
2022-07-06 22:01:22.701 +03:00 [DBG] Setting the cache items. Count: 95
2022-07-06 22:01:22.798 +03:00 [DBG] Finished setting the cache items. Count: 95
2022-07-06 22:01:22.822 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Roles,pn:R,pk:admin,n:AbpIdentity.Roles.Create,pn:R,pk:admin,n:AbpIdentity.Roles.Update,pn:R,pk:admin...................................................................
2022-07-06 22:01:22.876 +03:00 [DBG] Not found in the cache: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Roles,pn:R,pk:admin,n:AbpIdentity.Roles.Create,pn:R,pk:admin,n:AbpIdentity.Roles.Update,pn:R,pk:admin,...........................................................
2022-07-06 22:01:22.898 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: R,admin
2022-07-06 22:01:22.929 +03:00 [DBG] Setting the cache items. Count: 95
2022-07-06 22:01:23.011 +03:00 [DBG] Finished setting the cache items. Count: 95
2022-07-06 22:01:23.023 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Dibl_App,n:AbpIdentity.UserLookup
2022-07-06 22:01:23.064 +03:00 [DBG] Not found in the cache: pn:C,pk:Dibl_App,n:AbpIdentity.UserLookup
2022-07-06 22:01:23.072 +03:00 [DBG] Getting all granted permissions from the repository for this provider name,key: C,Dibl_App
2022-07-06 22:01:23.086 +03:00 [DBG] Setting the cache items. Count: 104
2022-07-06 22:01:23.199 +03:00 [DBG] Finished setting the cache items. Count: 104
2022-07-06 22:01:23.227 +03:00 [DBG] STOPWATCH ApplicationAuthConfigurationDto() - 1381
2022-07-06 22:01:23.235 +03:00 [DBG] STOPWATCH GetFeaturesConfigAsync() - 2
2022-07-06 22:01:23.324 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 1 - 84
2022-07-06 22:01:35.268 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 11939
2022-07-06 22:01:35.276 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 3 - 5
2022-07-06 22:01:35.279 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - 12039
2022-07-06 22:01:35.550 +03:00 [DBG] STOPWATCH GetSettingConfigAsync() - 262
2022-07-06 22:01:35.982 +03:00 [DBG] STOPWATCH GetAsync() - 14142
2022-07-06 22:01:35.985 +03:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
* **Steps to reproduce the issue**:"
Enable redis...

After that:
AbpApplicationConfigurationAppService.GetAsync() is executed about 12+ sec
And this method is called every refresh page.
I added some Stopwatch and got such results:
2022-07-06 22:01:35.268 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 11939

Why does reading localization resources take this time? What can I do with this problem?

If I disable redis I will get: STOPWATCH GetAsync() - 2069, and this method is called once.

from code:

stopWatch1.Start();

foreach (var resource in _localizationOptions.Resources.Values)
{
    var dictionary = new Dictionary<string, string>();

    var localizer = _serviceProvider.GetRequiredService(
        typeof(IStringLocalizer<>).MakeGenericType(resource.ResourceType)
    ) as IStringLocalizer;

    foreach (var localizedString in localizer.GetAllStrings())
    {
        dictionary[localizedString.Name] = localizedString.Value;
    }

    localizationConfig.Values[resource.ResourceName] = dictionary;
}

Logger.LogDebug("STOPWATCH GetLocalizationConfigAsync() - PART 2 - " + stopWatch1.ElapsedMilliseconds);

Best regards, Advantiss Inc

Showing 11 to 20 of 21 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35