Base solution for your next web application
Open Closed

Constant reloading and mapping of modules #3127


User avatar
0
sparkyjr created

Hi,

Our ABP module seem to be constantly re-initializing in production. It seems to be happening every couple of minutes. I haven't been able to pin point it to a particular trigger, but I do see this happening as frequently at once every 2 - 3 minutes. Sometimes there is as much as 20 minutes delay between log entries.

I don't see this happening every time. First time when I load the app, I see log entry of 19 ABP modules getting loaded, but then I see log entries for 18 ABP modules getting loaded over and over, followed by automapping and web api controller recreation each time.

We have a background service running and there is a call to stop it before each reload. Any ideas what would be triggering reloading of modules and remapping. I suspect this could be the reason for the slow performance I am seeing on Azure.

Here is the truncated logs, similar entries are showing up every so many minutes.

DEBUG 2017-05-08 08:43:09,228 [48   ] Abp.BackgroundJobs.BackgroundJobManager  - Stop background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:09,228 [48   ] BackgroundWorker.ActualUpdationDueWorker - Stop background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
DEBUG 2017-05-08 08:43:09,228 [48   ] Abp.BackgroundJobs.BackgroundJobManager  - WaitToStop background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:09,228 [48   ] BackgroundWorker.ActualUpdationDueWorker - WaitToStop background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
DEBUG 2017-05-08 08:43:10,684 [58   ] Abp.Modules.AbpModuleManager             - Loading Abp modules...
DEBUG 2017-05-08 08:43:11,309 [58   ] Abp.Modules.AbpModuleManager             - Found 18 ABP modules in total.
DEBUG 2017-05-08 08:43:11,324 [58   ] Abp.Modules.AbpModuleManager             - Loaded module: PlanQube.Web.PlanQubeWebModule, PlanQube.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

.............
DEBUG 2017-05-08 08:43:11,340 [58   ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Hangfire.AbpHangfireModule, Abp.HangFire, Version=0.8.3.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-05-08 08:43:11,496 [58   ] Abp.Modules.AbpModuleManager             - 18 modules loaded.
DEBUG 2017-05-08 08:43:11,621 [58   ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:11,637 [58   ] o.Configuration.LanguageManagementConfig - Converted PlanQube (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2017-05-08 08:43:15,543 [58   ] Abp.Localization.LocalizationManager     - Initializing 4 localization sources.
DEBUG 2017-05-08 08:43:15,590 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: Abp
DEBUG 2017-05-08 08:43:15,606 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpWeb
DEBUG 2017-05-08 08:43:15,606 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpZero
DEBUG 2017-05-08 08:43:15,621 [58   ] Abp.Localization.LocalizationManager     - Initialized localization source: PlanQube
DEBUG 2017-05-08 08:43:15,731 [58   ] Abp.BackgroundJobs.BackgroundJobManager  - Start background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2017-05-08 08:43:16,981 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - Found 149 classes defines auto mapping attributes
DEBUG 2017-05-08 08:43:16,981 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - PlanQube.Web.Areas.Mpa.Models.Users.UserPermissionsEditViewModel

....

DEBUG 2017-05-08 08:43:17,605 [58   ] Abp.AutoMapper.AbpAutoMapperModule       - PlanQube.Authorization.Users.Dto.UserListDto+UserListRoleDto
DEBUG 2017-05-08 08:43:17,621 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.Tenants.Dashboard.ITenantDashboardAppService' with service name 'app/tenantDashboard'.
DEBUG 2017-05-08 08:43:17,637 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.Sessions.ISessionAppService' with service name 'app/session'.

......

DEBUG 2017-05-08 08:43:17,918 [58   ] Abp.Logging.LogHelper                    - Dynamic web api controller is created for type 'PlanQube.ApplicationServices.ImportData.IImportDataAppService' with service name 'app/importData'.
DEBUG 2017-05-08 08:43:40,135 [58   ] BackgroundWorker.ActualUpdationDueWorker - Start background worker: Castle.Proxies.ActualUpdationDueWorkerProxy
WARN  2017-05-08 08:43:58,713 [37   ] Abp.Auditing.WebAuditInfoProvider        - Could not obtain web parameters for audit info.

3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @sparkyjr,

    Thanks for the information, this might be the cause of slowness problem on azure as you said. We couldn't make any progress on that yet but this information will help us.

    Do you use the latest ABP ? If not, can you share the ABP version you are using ?

    Thanks.

  • User Avatar
    0
    sparkyjr created

    We have not upgraded to the latest ASPNetZero version yet. We are still running on ABP Version 0.8.3.0 (from package config) and the ASPNETZero version reported is v1.9.0.1.

    Are there other ASPNetZero applications that are running without hiccups on Azure? Other than adding new pages and business logic, the only thing we are using is the Background Jobs feature of ASPNetZero. I have been facing problems with ASPNetZero and Azure for more than a month now and almost always it appears to be sporadic and hence difficult to chase down.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Normally ABP loads modules in the application start. Maybe azure is restarting your app so frequently, is that possible ?

    If you think ABP is loading modules even your app is not restarted, you can write some logs in Global.asax's application start and end events to see it.

    By the way, does your app works faster in any other environment ? Maybe you have told this before but I don't remember it :)