I have an Ubuntu 16.04 VPS and started to test SQL Server on it. Installation went flawlessly and I was using it for about a month without any problems. Then I did an apt update and it didn't start. Tbh it started with this kind of error (don't remember the exact error code):
Server is in script upgrade mode. Only administrator can connect at
this time.
I was in a hurry and managed to start it with a switch I found somewhere and it was running for one more week. But today it was eating 100% of CPU time and was so slow even an application at localhost couldn't work because of timeout errors.
This is a test server only so I thought that I remove and install sql server again. I did but that didn't help either. I have installed an express version but even the mssql-conf setup was working for ~1 hour before it has started and I still can not connect remotely with management studio, ad localhost connections are slow, too. It is using 1% of cpu time now tough.
I have deleted everything from /opt/mssql before reinstalling it. Removed everything even from /var/opt/mssql and it's working now. Why I can not connect? (timeout) What could have changed since it was working very well the first time?
My VPS is a cheap virtual server with a KVM host. the VPS has 4GB RAM and 4CPU "vCore". Last log is shown below but I think it doesn't say anything interesting. How can I get back the previous good configuration and reaction time? Or how can I determine what causes it's problem?
2019-04-08 12:55:50.40 Server Microsoft SQL Server 2017 (RTM-CU14) (KB4484710) - 14.0.3076.1 (X64)
Mar 12 2019 19:29:19
Copyright (C) 2017 Microsoft Corporation
Express Edition (64-bit) on Linux (Ubuntu 16.04.6 LTS)
2019-04-08 12:55:50.40 Server UTC adjustment: 0:00
2019-04-08 12:55:50.41 Server (c) Microsoft Corporation.
2019-04-08 12:55:50.41 Server All rights reserved.
2019-04-08 12:55:50.41 Server Server process ID is 28.
2019-04-08 12:55:50.41 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2019-04-08 12:55:50.41 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2019-04-08 12:55:50.42 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors
based on SQL Server licensing. This is an informational message; no user action is required.
2019-04-08 12:55:50.42 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2019-04-08 12:55:50.43 Server Detected 3277 MB of RAM. This is an informational message; no user action is required.
2019-04-08 12:55:50.43 Server Using conventional memory in the memory manager.
2019-04-08 12:55:50.54 Server Buffer pool extension is already disabled. No action is necessary.
2019-04-08 12:55:50.64 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2019-04-08 12:55:50.64 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2019-04-08 12:55:50.65 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2019-04-08 12:55:50.69 Server The maximum number of dedicated administrator connections for this instance is '1'
2019-04-08 12:55:50.69 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA
configuration for this computer. This is an informational message only. No user action is required.
2019-04-08 12:55:50.70 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2019-04-08 12:55:50.71 Server In-Memory OLTP initialized on lowend machine.
2019-04-08 12:55:50.75 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2019-04-08 12:55:50.76 Server Query Store settings initialized with enabled = 1,
2019-04-08 12:55:50.77 spid7s Starting up database 'master'.
2019-04-08 12:55:50.77 Server Software Usage Metrics is disabled.
2019-04-08 12:55:51.00 spid7s 10 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2019-04-08 12:55:51.03 spid7s 1 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2019-04-08 12:55:51.04 spid7s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2019-04-08 12:55:51.45 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2019-04-08 12:55:51.45 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2019-04-08 12:55:51.51 Server Failed to verify the Authenticode signature of 'C:\binn\secforwarder.dll'. Signature verification of SQL Server DLLs will be skipped. Genuine copies of SQL Server are signed. Failure to verify the Authenticode signature might indicate that this is not an authentic release of SQL Server. Install a genuine copy of SQL Server or contact customer support.
2019-04-08 12:55:51.58 spid7s SQL Trace ID 1 was started by login "sa".
2019-04-08 12:55:51.82 spid7s Server name is 'vs2558'. This is an informational message only. No user action is required.
2019-04-08 12:55:51.83 spid22s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2019-04-08 12:55:51.84 spid22s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2019-04-08 12:55:51.84 spid7s Starting up database 'msdb'.
2019-04-08 12:55:51.84 spid10s Starting up database 'mssqlsystemresource'.
2019-04-08 12:55:51.84 spid10s The resource database build version is 14.00.3076. This is an informational message only. No user action is required.
2019-04-08 12:55:51.87 spid10s Starting up database 'model'.
2019-04-08 12:55:52.19 spid18s A self-generated certificate was successfully loaded for encryption.
2019-04-08 12:55:52.19 spid10s Polybase feature disabled.
2019-04-08 12:55:52.19 spid10s Clearing tempdb database.
2019-04-08 12:55:52.20 spid18s Server is listening on [ 'any' <ipv6> 1433].
2019-04-08 12:55:52.20 spid18s Server is listening on [ 'any' <ipv4> 1433].
2019-04-08 12:55:52.21 spid18s Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated ad
ministrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2019-04-08 12:55:52.22 spid18s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2019-04-08 12:55:52.40 spid10s Starting up database 'tempdb'.
2019-04-08 12:55:52.60 spid22s The Service Broker endpoint is in disabled or stopped state.
2019-04-08 12:55:52.60 spid22s The Database Mirroring endpoint is in disabled or stopped state.
2019-04-08 12:55:52.61 spid22s Service Broker manager has started.
2019-04-08 12:55:52.90 spid7s Recovery is complete. This is an informational message only. No user action is required.
2019-04-08 13:01:45.81 spid52 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2019-04-08 13:01:45.85 spid52 Using 'xplog70.dll' version '2017.140.3076' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
Best Answer
After upgrading the packages of my Ubuntu 16.04.6 I discovered a similar behavior.
The installation/upgrade of mssql-server to current 14.0.3192.2-2 or other versions was trouble-free. So i didn't get any script upgrade mode you had. But I recognized a significant performance drop. Nothing in logs but with the profiler I discovered, that the mssql server had a 2 second delay to establish a tcp/ip connection. DNS is fine and my webserver is running on the same server and connects over ip/localhost.
Only workaround for me is to stick with version 14.0.3048.4-1
Seems something is broken with 14.0.3076.1-2 / CU14 and up :-/