SqlServer в Linux становится очень медленным

У меня есть Ubuntu 16.04 VPS, и я начал тестировать на нем SQL Server. Установка прошла безупречно, и я без проблем пользовался ею около месяца. Потом сделал удачное обновление, но оно не запустилось. Tbh это началось с такой ошибки (не помню точный код ошибки):

Сервер находится в режиме обновления сценария. Только администратор может подключиться к на этот раз.

Я очень спешил, и мне удалось запустить его с помощью переключателя, который я где-то нашел, и он работал еще неделю. Но сегодня он потреблял 100% процессорного времени и был настолько медленным, что даже приложение на локальном хосте не могло работать из-за ошибок тайм-аута. Это только тестовый сервер, поэтому я подумал, что удаляю и снова устанавливаю sql-сервер. Я это сделал, но это тоже не помогло. Я установил экспресс-версию, но даже установка mssql-conf работала в течение ~ 1 часа до ее запуска, и я все еще не могу удаленно подключиться к студии управления, соединения с локальным хостом тоже медленные. Сейчас он использует 1% времени процессора.

Я удалил все из / opt / mssql перед его переустановкой. Удалил все даже из / var / opt / mssql, и теперь он работает. Почему не могу подключиться? (тайм-аут) Что можно было изменить, если с первого раза он работал очень хорошо?

Мой VPS - это дешевый виртуальный сервер с хостом KVM. VPS имеет 4 ГБ ОЗУ и 4 ЦП «vCore». Последний отчет показан ниже, но я думаю, что он не говорит ничего интересного. Как мне вернуть предыдущую правильную конфигурацию и время реакции? Или как определить причину проблемы?

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.
1
задан 8 April 2019 в 16:19
1 ответ

После обновления пакетов моего Ubuntu 16.04.6 я обнаружил похожее поведение.

Установка / обновление mssql-server до текущей версии 14.0.3192.2-2 или других версий прошел без проблем. Так что я не получил никакого режима обновления сценария, который у вас был. Но я заметил существенное падение производительности. В журналах ничего нет, но с помощью профилировщика я обнаружил, что сервер mssql имеет 2-секундную задержку для установления соединения tcp / ip. DNS в порядке, и мой веб-сервер работает на том же сервере и подключается через ip / localhost.

Единственное решение для меня - придерживаться версии 14.0.3048.4-1

Кажется, что-то не работает с 14.0.3076.1-2 / CU14 и выше: - /

2
ответ дан 3 December 2019 в 20:08

Теги

Похожие вопросы