Open Closed

In the production environment, the Blazor Server application frequently reconnects (a reconnection message appears in a modal in less than a minute), while it runs stably in the testing environment. #7354


User avatar
0
327992883@qq.com created
  • ABP Framework version: v7.2.3
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • In the development and testing environments, there is no reconnect prompt when the page is idle for a long time. However, in the production environment, sometimes there is a reconnect prompt after just a few seconds of inactivity, while other times, it may take several hours without a reconnect prompt. When the service is just restarted, the page remains stable without needing to reconnect for half an hour or even several hours. However, after running for a few hours post-restart, frequent reconnect prompts occur, sometimes less than a minute apart. This is critical in the production environment, and customers have started to complain. The code and configuration in my production and testing environments are identical, with the only difference being the user load and similar factors. I checked the server's memory and CPU usage; memory usage is around 69%, and CPU usage is around 40%.

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

    hi

    Please check the app logs, It may contain the details info.

    You can set the log level to Debug to see more logs.

    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11