다음을 통해 공유


MSSQLSERVER_35267

적용 대상:SQL Server

세부 사항

attribute
제품 이름 SQL Server
이벤트 ID 35267
이벤트 원본 MSSQLSERVER
구성 요소 SQLEngine
심볼 이름 HADR_DISCONNECTED_DB
메시지 텍스트 복제본 ID가 {%.S_MSG 8x-%.4x-%.4x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x}인 가용성 복제본 '%.*ls'에서 %S_MSG 데이터베이스 '%.*ls'에 대해 Always On 가용성 그룹 연결이 종료되었습니다. 이 메시지는 정보 제공용이므로 추가적인 조치가 필요하지 않습니다.

설명

이 메시지는 가용성 그룹 복제본이 데이터베이스 미러링 엔드포인트의 원격 복제본에 대한 연결을 끊을 때 발생합니다. 다음은 이 오류를 볼 수 있는 방법의 예입니다.

Always On Availability Groups connection with secondary database terminated for primary database 'ContosoDb' on the availability replica 'PRODSQL' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.
Always On Availability Groups connection with primary database terminated for secondary database 'ContosoDb' on the availability replica 'PRODSQL' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.

주 복제본에 오류가 표시되면 보조 복제본과의 통신이 끊어지거나 그 반대의 경우도 마찬가지입니다.

오류 35267은 일반적으로 간헐적으로 발생하며 근본 원인이 자체적으로 해결되는 순간 자체적으로 해결할 수 있습니다. 예를 들어 간헐적인 네트워크 문제가 자체적으로 해결되고 연결이 다시 설정될 수 있습니다.

대부분의 경우 로컬 노드가 연결하려고 하는 원격 노드가 연결 실패를 인식하지 못할 수도 있습니다. 따라서 두 복제본이 아닌 복제본 중 하나에서만 이 오류가 발생하는 것을 볼 수 있습니다.

오류 35267은 경우에 따라 오류 35206과 함께 발생할 수 있습니다. 이 오류는 연결에 성공하지 않고 상당한 기간이 경과했을 때 발생합니다(예: 10초 이상).

A connection timeout has occurred on a previously established connection to availability replica 'PRODSQL' with id [xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx].  Either a networking or a firewall issue exists or the availability replica has transitioned to the resolving role.

Always On Availability Groups connection with primary database terminated for secondary database 'ContosoHRDb' on the availability replica 'PRODSQL' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.
Always On Availability Groups connection with primary database terminated for secondary database 'ContosoFinDb' on the availability replica 'PRODSQL' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.
Always On Availability Groups connection with primary database terminated for secondary database 'ContosoMktngDb' on the availability replica 'PRODSQL' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.

원격 복제본과의 AG 연결 종료로 인해 로컬 복제본에 다양한 문제가 발생할 수 있습니다. 예를 들어 AG에서 SYNCHRONOUS 모드를 사용하고 연결이 끊어지면 로컬 복제본이 원격에서 확인을 기다리고 있을 수 있습니다. 따라서 트랜잭션 로그가 잘리지 않고 트랜잭션 로그가 공간이 부족하여(오류 9002) 나중에 사용할 수 없게 됩니다(오류 9001). 이 문제가 발생한 오류 그룹의 예는 다음과 같습니다. 트랜잭션 로그가 가득 찬 이유는 'AVAILABILITY_REPLICA'입니다. 즉, 이 복제본은 원격 복제본이 로그 레코드를 적용했음을 인정하기를 기다리고 있습니다.

Error: 9002, Severity: 17, State: 9.
The transaction log for database 'ContosoAnalyticsDb' is full due to 'AVAILABILITY_REPLICA'.
Error: 3314, Severity: 21, State: 3.
During undoing of a logged operation in database 'ContosoAnalyticsDb' (page (1:32573799) if any), an error occurred at log record ID (7672713:36228:159). Typically, the specific failure is logged previously as an error in the operating system error log. Restore the database or file from a backup, or repair the database.
State information for database 'ContosoAnalyticsDb' - Hardened Lsn: '(7672713:38265:1)'    Commit LSN: '(7672712:1683087:46)'    Commit Time: 'JuN  10 2022  5:51AM'

Always On Availability Groups connection with secondary database terminated for primary database 'ContosoAnalyticsDb' on the availability replica 'SQL2019DB' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.

Database ContosoAnalyticsDb was shutdown due to error 3314 in routine 'XdesRMReadWrite::RollbackToLsn'. Restart for non-snapshot databases will be attempted after all connections to the database are aborted.

Error during rollback. shutting down database (location: 1).
Error: 9001, Severity: 21, State: 5.
The log for database 'ContosoAnalyticsDb' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.

Recovery of database 'ContosoAnalyticsDb' (6) is 0% complete (approximately 60177 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.

원인

  • 주 복제본과 보조 복제본 간에 네트워크 연결 문제가 있을 수 있습니다.
  • 주 복제본 또는 보조 복제본의 SQL Server 또는 OS 문제로 인해 스레드를 실행할 수 없습니다. 예를 들면 다음과 같습니다.
    • SQL OS 스케줄러 문제(비수익 또는 교착 상태 스케줄러)
    • SQL Server를 포함하여 시스템의 모든 프로세스에 대한 작업 집합 트리밍으로 이어지는 컴퓨터의 메모리 부족
    • 프로세스의 응답을 중지하는 운영 체제 문제
  • 주 복제본 또는 보조 복제본에서 간헐적으로 긴 대기를 발생시키는 느린 I/O 문제

사용자 작업

아래 정보는 보다 일반적인 시나리오를 간략하게 설명하지만 문제 해결 단계의 전체 목록은 아닙니다. 이 문제가 발생하는 특정 원인에는 긴 가능성 목록이 포함될 수 있습니다.

연결 문제

오류가 원격 SQL Server에 발생하는 SQL Server의 연결 문제를 확인하려면 다음 단계를 고려할 수 있습니다.

1단계 원격 SQL Server의 엔드포인트가 활성 상태인지 확인

다음 쿼리를 실행하여 엔드포인트를 검색합니다.

SELECT
 tep.name as EndPointName,
 sp.name As CreatedBy,
 tep.type_desc,
 tep.state_desc,
 tep.port
FROM
 sys.tcp_endpoints tep
INNER JOIN sys.server_principals sp ON tep.principal_id = sp.principal_id
WHERE tep.type = 4

2단계. 원격 엔드포인트에 대한 연결 테스트

Test-NetConnection을 사용하여 연결의 유효성을 검사합니다. 엔드포인트가 수신 대기 중이고 연결이 성공하면 .를 TcpTestSucceeded : True찾습니다. ServerName 또는 IP_Address 원격 SQL Server로 바꾸고 포트 번호를 데이터베이스 미러링 엔드포인트의 포트 번호로 바꿉다.

Test-NetConnection -ComputerName <ServerName> -Port <port_number>
Test-NetConnection -ComputerName <IP_address> -Port <port_number>

3단계: 네트워크 추적 수집

네트워크 재설정(삭제된 패킷) 또는 유사한 문제를 보여주는 네트워크 추적을 캡처하지 않는 한 간헐적인 네트워크 오류를 추적하기가 어려운 경우가 많습니다. 자세한 내용은 0300 간헐적 또는 주기적 네트워크 문제를 참조 하세요.

SQL Server 스케줄러 문제

SQL Server 작업자 스레드가 여러 가지 이유로 스케줄러 문제가 발생하는 경우 스케줄러 문제가 지속되는 동안 들어오는 요청을 서비스하는 스레드가 일시적으로 응답하지 않을 수 있습니다.

4단계. SQL Server에서 스케줄러 문제 확인

일반적인 비수익 스케줄러 문제는 70초의 비수익 상태 후에 SQL Server 오류 로그에 기록됩니다. 그러나 SQL Server는 스케줄러의 상태를 보다 자주 확인하고 확장 이벤트에서 이러한 중간 비수익 상태를 보고합니다. 오류 35267 시간에 해당하는 원격 노드에서 스케줄러 문제를 발견하면 먼저 해결에 집중합니다. 다음은 70초 임계값에 도달하지 않지만 10초 또는 20초 동안 발생하는 수명이 짧은 스케줄러 문제의 발생을 확인하는 방법입니다.

System Health 확장 이벤트 파일 사용

  1. 이벤트 시간부터 System Health 확장 이벤트 파일을 찾습니다.
  2. SSMS(SQL Server Management Studio)에서 열려면 두 번 클릭합니다 system_health_0_xxxxxxxxxxxxxxxxxx.xel . 또는 쉽게 필터링할 수 있도록 파일을 테이블로 보거나 가져오는 데 사용할 sys.fn_xe_file_target_read_file 수 있습니다.
  3. scheduler_monitor_non_yielding_ring_buffer_recorded 이벤트의 발생을 검색합니다. 있는 경우 SQL Server에서 비수익 스케줄러 이벤트를 감지하고 기록 중임을 나타냅니다. 이러한 이벤트는 60-70초의 비수익 상태 후에 발생하는 실제 비이글링 스케줄러 메모리 덤프 및 오류 로그 항목보다 일찍 기록됩니다. 즉, scheduler_monitor_non_yielding_ring_buffer_recorded 사용하여 오류 로그에 기록되지 않았지만 여전히 발생한 수명이 짧은 비발생 스케줄러 문제를 검색할 수 있습니다. 이러한 원인은 간헐적이거나 AG 노드 간의 연결이 단기간에 부족한 원인일 수 있습니다.

SQLDIAG 확장 이벤트 로그 사용

  1. 이벤트 시간(Windows 클러스터 시스템에 적용 가능)부터 \Log 디렉터리에서 SQLDIAG 확장 이벤트 로그를 찾습니다. 파일 이름 형식은 다음과 SERVERNAME_MSSQLSERVER_SQLDIAG_x_xxxxxxxxxxxxxxxxxx.xel같습니다.

  2. SSMS(SQL Server Management Studio)에서 파일을 열려면 두 번 클릭합니다. 또는 쉽게 필터링할 수 있도록 파일을 테이블로 보거나 가져오는 데 사용할 sys.fn_xe_file_target_read_file 수 있습니다.

  3. SSMS에서 열리면 component_health_result 이벤트 인스턴스를 찾고 다음을 마우스 오른쪽 단추로 클릭하고 테이블에 열 표시를 선택합니다. 구성 요소, state_desc

  4. 그런 다음 각 열을 마우스 오른쪽 단추로 클릭하고 이 값으로 필터를 선택하여 다음 필터를 적용합니다.

    • component_health_result 이벤트는 유일하게 표시됩니다.
    • component field='query processing'
    • '깨끗한'을 state_desc<> .
  5. 그런 다음 데이터 열을 두 번 클릭하여 XML 데이터를 열고 첫 번째 행에서 값을 찾 trackingNonYieldingScheduler 습니다.

  6. 값이 다른 0x0 경우 SQL Server가 비수익 스케줄러의 초기 징후를 감지하고 여기에 보고했음을 의미합니다.

    다음은 SQL Server가 스케줄러 주소가 "0x4fedb840040"인 비수익 조건을 검색한 예제입니다.

     <queryProcessing maxWorkers="9600" workersCreated="2574" workersIdle="1883" tasksCompletedWithinInterval="175591" pendingTasks="3" ... trackingNonYieldingScheduler="0x4fedb840040">
    

운영 체제 메모리 부족

OS(운영 체제) 수준에서 이러한 일시적인 응답 부족을 트리거하는 다양한 문제가 있을 수 있습니다. 일반적인 것은 메모리 부족입니다. 의심되는 문제가 발생하는 원격 AG 노드에서 다음 단계를 수행합니다.

5단계. 디스크에 SQL Server 메모리 페이징으로 이어지는 OS 메모리 문제 확인

  1. 실제 메모리 또는 가상 메모리가 낮음을 나타내는 오류는 Windows 시스템 이벤트 로그를 확인합니다.

  2. SQL Server 오류 로그 또는 Windows 애플리케이션 이벤트 로그에서 오류 17890을 확인하여 컴퓨터의 메모리 부족이 SQL Server를 비롯한 시스템의 모든 프로세스에 대한 작업 집합 트리밍으로 이어지는지 확인합니다. 오류는 다음과 같습니다.

    A significant part of SQL Server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 3383250, committed (KB):    9112480, memory utilization: 37%.
    

    자세한 t-shooting 단계는 MSSQLSERVER_17890 참조하세요 .

6단계 메모리의 최대 서버 메모리 및 잠긴 페이지 구성

  1. SQL Server 최대 서버 메모리를 OS 및 기타 프로세스 사용에 사용할 수 있는 메모리를 허용하는 값으로 구성합니다. SQL Server 최대 서버 메모리를 시스템에서 RAM 크기의 75% 이하로 설정하는 데 권장되는 값입니다. 자세한 내용은 서버 메모리 구성 옵션을 참조 하세요.
  2. 메모리에서 페이지 잠금 옵션(Windows) 을 사용하도록 설정하여 SQL Server 버퍼 캐시의 대량 페이징을 방지합니다.

느린 디스크 I/O

경우에 따라 I/O가 지나치게 느려질 경우 SQL Server 스레드가 일시적으로 응답하지 않을 수 있으므로 다른 AG 복제본의 연결이 끊어질 수 있습니다.

7단계 느린 I/O 문제 해결

느린 I/O를 나타내는 오류가 발생하는 경우 느린 I/O에 대한 기본 이유를 해결합니다.

SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [F:\TLOG\ContosoDb.ldf] in database id 9.  The OS file handle is 0x00000000000003BC.  The offset of the latest long I/O is: 0x0000003d26f600
SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [F:\DATA\t38data\ContosoDb2.mdf] in database id 7.  The OS file handle is 0x000000000000118C.  The offset of the latest long I/O is: 0x00000000012000
SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [F:\DATA\t38data\ContosoDb.mdf] in database id 9.  The OS file handle is 0x000000000000134C.  The offset of the latest long I/O is: 0x00000000012000

Always On Availability Groups connection with primary database terminated for secondary database 'ContosoDb2' on the availability replica 'SQLNODE1\INSTANCE19' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.
Always On Availability Groups connection with primary database terminated for secondary database 'ContosoDb' on the availability replica 'SQLNODE1\INSTANCE19' with Replica ID: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. This is an informational message only. No user action is required.
  • 모든 디바이스 드라이버 및 펌웨어를 업데이트하거나 I/O 하위 시스템에 연결된 다른 진단을 수행합니다.
  • 필터 드라이버(예: 바이러스 백신 프로그램)에 의해 디스크 액세스 속도가 느려질 수 있습니다. 액세스 속도를 높이려면 활성 바이러스 검사에서 SQL Server 데이터 파일을 제외합니다.
  • 하드웨어 공급업체 및 시스템 관리자와 협력하여 느린 I/O의 원인을 진단하고 해결합니다.

자세한 지침은 I/O 문제로 인한 느린 SQL Server 성능 문제 해결 및 MSSQLSERVER_833 참조하세요.