SQL Server running on Linux, instance starts almost 2 mins after the service

  • SQL Server (2022) running on Linux (SuSE 15.4), instance starts almost 2 mins after the service.

    When the system starts, systemctl status mssql-server.service reports, something like

    Active: active (running) since Wed 2023-06-28 15:47:57 UTC; 2min 43s ago

    However, sql server is not available immidately, has to wait almost 2 mins before can be queried.

    When checking the errorlog file at /var/opt/mssql/log/

    2023-06-28 15:49:36.73 Server Microsoft SQL Server 2022 (RTM-CU4) (KB5026717) - 16.0.4035.4 (X64)

    The instance started almost 2 mins after the service started.

    Can anyone help?

    Thanks

    Tom

  • This issue could be caused by SQL Server taking additional time to perform initialization tasks after the service starts. Here's a possible solution:

    Open the SQL Server Configuration Manager.

    Go to SQL Server Services.

    Right-click on your SQL Server instance and select Properties.

    In the Properties window, go to the Advanced tab.

    Look for the "Startup Parameters" field and click on it.

    Add the following parameter at the end of the existing parameters: -T4022

    Click OK to save the changes.

    Restart the SQL Server service.

    The -T4022 parameter enables trace flag 4022, which will log additional information during startup. Review the error log file again (/var/opt/mssql/log/) to see if any specific tasks or issues are causing the delay. Adjustments may be needed based on the information logged.

    I hope it will help.

     

    Thanks
    Raavikant

  • Ravi, thanks for the suggestion. How do I run the configuration tool on Linux?

    Thanks

    Tom

  • Ravi, I managed to do the following

    sudo /opt/mssql/bin/mssql-conf traceflag 4022 on

    However, it didn't give any extra info.

    When run

    systemctl status mssql-server.service

    Active: active (running) since Thu 2023-06-29 13:19:25 UTC; 3s ago

    Howerver on the errorlog

    2023-06-29 13:21:06.07 spid29s [32767]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1. ConcurrentGAMUpdate: 1. ConcurrentSGAMUpdate: 1, CleanupUnderUserTransaction: 0. TranLevelPVS: 0

    2023-06-29 13:21:06.08 spid43s Starting up database 'dmlvts'.

    2023-06-29 13:21:06.08 spid42s Starting up database 'msdb'.

    as you can see, it starts about 2 mins later than the service.

    Rgs

    Tom

  • Does SQL on linux do a JIT compilation of the binaries?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply