Open Closed

Application on AKS is freeze when starting the first time #9012


User avatar
0
thanhvl1 created

Hi, I have deployed my app to AKS, and when start AKS at the first time, some service is freeze and not responding, at that time, I have to stop and start only that service (in AKS I have to delete that pod and it will create again), then that service can be able to run normally.

There is no any exception and stack trace, because it is freeze at the line like the image log below

In the local environment, I don't get this problem


5 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    Do you deploy database in the cluster at the same time, too? Since there is no error log it's pretty hard to understand the problem but there can be some connection problems such as trying to connect redis or database or other services if it's a microservice application

  • User Avatar
    0
    thanhvl1 created

    No, It is separated. I use Azure Services for database, redis cache. Today, when the service is started by schedule, I got another freeze like the picture below

    When I notice the log in the end before freezing, it's all about related to Identity But mostly it stucked at "Volo.Abp.IdentityModel.AbpIdentityModelModule" when initializing

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    It seems it stucks while trying acuiring lock for IdentitySessionCleanupBackgroundWorker. The log says it already acquired the lock but this process takes a lot of time or it cannot perform the action: https://github.com/abpframework/abp/blob/d5087c6b940320a3e932be348812d32fe06255a8/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Tokens/TokenCleanupBackgroundWorker.cs#L38-L41

    Since it has "Start cleanup." logs at the beginning of the method: https://github.com/abpframework/abp/blob/d5087c6b940320a3e932be348812d32fe06255a8/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Tokens/TokenCleanupService.cs#L36

    Probably one of its dependencies cannot be resolved or causes a problem.

    Can you try disabling background workers and deploy it again to make sure if it's the reason or not? https://abp.io/docs/latest/framework/infrastructure/background-workers#options

    And also, you can set LogLevel as Debug to see more details about what happens before freezing

  • User Avatar
    0
    thanhvl1 created

    when I try comment the background worker and restart that service, then change logging to Debug, I don't see anything when initializing module. It always stuck here

    [02:13:06 INF] - Volo.Abp.Http.Client.IdentityModel.AbpHttpClientIdentityModelModule [02:13:06 INF] - Volo.Abp.IdentityModel.AbpIdentityModelModule

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    It seems it's stuck while trying to initialize AbpHttpClientIdentityModelModule but there no special configuration in it. And it initialize AbpIdentityModelModule du to dependency to it. Nothing seems suspicious in that file.

    It tries to get configuration by calling context.Services.GetConfiguration() method but I do not think it may be the problem. https://github.com/abpframework/abp/blob/rel-9.0/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs

    Can you try removing [DependsOn(typeof(AbpHttpClientIdentityModelModule))] attribute and try again to make sure if the problem is related to module initialization or not. And then we can start to investigation on module initialization if it's related to that

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13