SharePoint Server에서 분산 캐시 서비스 관리

적용 대상:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

SharePoint Server의 배포된 캐시 서비스에서 관리 및 운영 작업을 수행하려면 관리자는 특정 절차를 순서대로 수행해야 합니다. 이 문서에서는 배포된 캐시 서비스에서 다양한 관리 및 운영 작업을 수행하는 방법에 대해 설명합니다.

중요

이 문서에 나와 있는 절차를 수행하지 않으면 배포된 캐시 서비스가 작동하지 않거나 복구할 수 없는 상태가 될 수 있습니다. 최악의 경우에는 서버 팜을 다시 구축해야 할 수도 있습니다. SharePoint Server 2019, 2016 및 2013의 경우 분산 캐시는 Windows Server AppFabric을 필수 구성 요소로 사용합니다. 제어판관리 도구에 있는 서비스 창에서 AppFabric 캐싱 서비스를 관리하지 마세요. 또한 시작 메뉴의 Windows Server용 AppFabric 폴더에 있는 응용 프로그램을 사용해서도 안 됩니다. SharePoint 분산 캐시를 사용하여 AppFabric에 대한 보안을 추가하는 것은 지원되지 않습니다. SharePoint Server 구독 버전 경우 별도의 Windows Server AppFabric 제품이 더 이상 사용되지 않으며 이 기술은 이제 SharePoint 내에 내부적으로 통합되었습니다.

중요

기호 $를 포함하는 서비스 계정 이름은 사용하지 마세요.

분산 캐시 서비스에 대한 PowerShell cmdlet 목록

이제 SharePoint Server PowerShell에서 다음 PowerShell cmdlet을 사용할 수 있습니다.

SharePoint Server 구독 버전 Cmdlet APP Fabric Cmdlet 설명
New-SPCache New-Cache 클러스터가 실행 중일 때 명명된 새 캐시를 만듭니다.
Get-SPCache Get-Cache 클러스터의 모든 캐시 및 지역과 각 지역이 상주하는 캐시 호스트를 나열합니다. 매개 변수가 없으면 모든 클러스터 캐시와 해당 호스트 지역 세부 정보가 반환됩니다. Hostname 및 CachePort 매개 변수가 제공되면 캐시 및 지역 세부 정보는 지정된 호스트에 대해서만 반환됩니다.
Get-SPCacheStatistics Get-CacheStatistics 캐시 또는 캐시 호스트에 대한 통계를 반환합니다.
Get-SPCacheHost Get-CacheHost 캐시 클러스터의 멤버인 모든 캐시 호스트 서비스를 나열합니다.
Start-SPCacheCluster Start-CacheCluster 클러스터의 모든 캐시 호스트에서 캐싱 서비스를 시작합니다. 잠재 고객 호스트가 먼저 시작됩니다.
Stop-SPCacheCluster Stop-CacheCluster 클러스터의 모든 캐시 호스트에서 캐싱 서비스를 중지합니다.
Import-SPCacheClusterConfig Import-CacheClusterConfig XML 파일에서 캐시 클러스터 구성 세부 정보를 가져옵니다.
Export-SPCacheClusterConfig Export-CacheClusterConfig 캐시 클러스터 구성을 XML 파일로 내보냅니다.
Get-SPCacheClusterHealth Get-CacheClusterHealth 캐시 클러스터의 명명된 모든 캐시에 대한 상태 통계를 반환합니다. 여기에는 아직 할당되지 않은 항목이 포함됩니다.
Use-SPCacheCluster Use-CacheCluster PowerShell 세션의 컨텍스트를 특정 캐시 클러스터로 설정합니다.
Get-SPCacheHostConfig Get-CacheHostConfig 캐시 클러스터의 캐시 호스트 구성 정보를 가져옵니다.
Get-SPCacheClusterInfo Get-CacheClusterInfo 팜의 캐시 클러스터 정보를 가져옵니다.
Set-SPCacheClusterSecurity Set-CacheClusterSecurity 캐시 클러스터 보안 속성을 설정합니다.

배포된 캐시 서비스 시작 및 중지

유지 관리 및 운영 작업을 수행하는 관리자는 배포된 캐시 서비스를 시작하고 중지해야 할 수 있습니다. 여기에는 다음과 같은 몇 가지 작업이 포함됩니다.

  • 설치 시에 서버 팜의 기본 구성 변경. 배포된 캐시 서비스는 설치 시에 모든 SharePoint 서버에서 시작됩니다. 관리자는 팜의 일부 서버에서 배포된 캐시 서비스를 중지할 수 있습니다.

  • SharePoint Server 팜에 배포된 캐시 서버가 하나뿐인 상태에서 서버 업데이트

캐시를 중지하면 데이터가 부분적으로 손실됩니다. 피드 캐시는 분산 캐시 서비스에 따라 달라집니다. 태그 및 문서 활동은 피드 캐시에만 저장됩니다. 태그 및 문서 활동은 콘텐츠 데이터베이스에 유지되지 않습니다. 분산 캐시 서비스가 중지되면 태그 및 문서 활동이 손실됩니다. 분산 캐시 서비스가 시작되면 피드 캐시 다시 채점 타이머 작업이 실행될 때 다시 채워집니다. 태그 및 문서 활동을 유지하는 한 가지 방법은 이 문서의 뒷부분에 있는 PowerShell 스크립트를 사용하여 분산 캐시 서비스의 정상적인 종료 수행에 설명된 메서드를 사용하는 것입니다. 분산 캐시 서비스 메서드를 정상적으로 종료하면 분산 캐시 서비스가 중지되기 전에 모든 캐시 데이터가 한 서버에서 다른 서버로 이동됩니다.

참고

캐시 호스트가 캐시 클러스터의 일부인 경우 여기에 설명된 대로 분산 캐시 서비스를 시작하거나 중지하지 마세요. 대신 이 문서의 뒷부분에 있는 분산 캐시 클러스터에서 서버 추가 또는 제거 를 참조하세요.

중앙 관리를 사용하여 배포된 캐시 서비스를 시작 및 중지하려면

  1. 중앙 관리에서 응용 프로그램 관리를 클릭합니다.

  2. 서비스 응용 프로그램에서 서버의 서비스 관리를 클릭합니다.

  3. 서버 제공 서비스 페이지에서 배포된 캐시 서비스를 찾습니다.

  4. 배포된 캐시 서비스가 시작된 경우 중지하려면 작업에서 중지를 클릭합니다. 배포된 캐시 서비스가 중지된 경우 시작하려면 작업에서 시작을 클릭합니다.

SharePoint 관리 셸을 사용하여 분산 캐시 서비스를 시작하려면

이렇게 하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

$instanceName ="SPDistributedCacheService Name=SPCache"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()

SharePoint 관리 셸을 사용하여 분산 캐시 서비스를 중지하려면

이렇게 하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

$instanceName ="SPDistributedCacheService Name=SPCache"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()

배포된 캐시 서비스의 메모리 할당 변경

SharePoint Server는 설치 시 서버의 총 실제 메모리 중 10%를 배포된 캐시 서비스에 할당합니다. 배포된 캐시 서비스는 할당된 메모리의 절반을 데이터 저장(캐시 크기라고도 함)에 사용하고 나머지 절반을 메모리 관리 오버헤드에 사용합니다. 캐시된 데이터가 증가하면 배포된 캐시 서비스는 할당된 10%의 메모리를 모두 사용합니다.

다음과 같은 시나리오에서는 배포된 캐시 서비스의 메모리 할당을 늘려야 합니다.

  • 서버에 실제 메모리를 추가하는 경우. 배포된 캐시 서비스는 10% 메모리 할당을 자동으로 다시 계산하지 않으므로 서버의 총 실제 메모리를 늘릴 때 배포된 캐시 서비스의 메모리 할당을 수동으로 늘려야 합니다.

  • 서버 팜에 전용 배포된 캐시 서버가 있는 경우. 다음 방법을 사용하여 배포된 캐시 서비스에 할당 가능한 메모리의 양을 계산합니다.

    1. 서버의 총 실제 메모리를 확인합니다. 이 예에서는 서버에서 사용 가능한 총 실제 메모리를 16GB라고 가정합니다.

    2. 캐시 호스트에서 실행되는 다른 프로세스 및 서비스용으로 2GB의 메모리를 예약해 둡니다. 예를 들어 16GB-2GB=14GB입니다. 이 나머지 메모리가 배포된 캐시 서비스에 할당됩니다.

    3. 나머지 메모리의 절반을 MB 단위로 변환합니다. 예를 들어 14GB/2=7GB, 즉 7168MB입니다. 이 값이 배포된 캐시 서비스의 캐시 크기입니다.

    4. 메모리 할당량을 적절하게 업데이트하려면 다음 절차를 따르세요.

배포된 캐시의 메모리 할당 변경

배포된 캐시 서비스 캐시 크기의 메모리 할당량을 다시 구성하려면 다음 절차를 따르세요.

  1. (옵션) 서버의 배포된 캐시 서비스에 대한 기존 메모리 할당을 확인하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

    Use-SPCacheCluster
    Get-SPCacheHostConfig -HostName $Env:ComputerName
    

    여기서,

    • ComputerName은 SharePoint 관리 셸 cmdlet을 실행하는 서버의 컴퓨터 이름입니다.
  2. 모든 캐시 호스트에서 배포된 캐시 서비스를 중지합니다. 배포된 캐시 서비스를 중지하려면 중앙 관리의 서버 제공 서비스로 이동한 다음 팜의 모든 캐시 호스트에서 배포된 캐시 서비스를 중지합니다.

  3. 배포된 캐시 서비스의 캐시 크기를 다시 구성하려면 SharePoint 관리 셸 명령 프롬프트에서 캐시 호스트에 대해 다음 명령을 한 번만 실행합니다.

    Update-SPDistributedCacheSize -CacheSizeInMB CacheSize
    

    여기서 각 부분이 나타내는 의미는 다음과 같습니다.

    • CacheSize는 캐시 크기에 지정된 메모리 할당량(MB)입니다. 위의 예제에서는 총 실제 메모리가 16GB인 서버에 대해 캐시가 7168MB로 계산되었습니다.
  4. 모든 캐시 호스트에서 배포된 캐시 서비스를 다시 시작합니다. 배포된 캐시 서비스를 다시 시작하려면 중앙 관리의 서버 제공 서비스로 이동한 다음 팜의 모든 캐시 호스트에서 배포된 캐시 서비스를 다시 시작합니다.

배포된 캐시 클러스터에서 서버 추가 또는 제거

관리자는 서버를 캐시 클러스터에 추가하거나 캐시 클러스터에서 제거하고, 서버에서 몇 가지 운영 또는 유지 관리 작업을 수행한 다음 해당 서버를 캐시 클러스터에 다시 연결하거나 추가할 수 있습니다. 서버를 제거하면 배포된 캐시 서비스가 중지되고 서버에서 등록이 취소됩니다. 배포된 캐시 서비스의 등록이 취소되면 관리자가 중앙 관리의 서버 제공 서비스 페이지에서 배포된 캐시 서비스를 볼 수 없습니다. 마찬가지로, 서버를 추가하면 배포된 캐시 서비스가 등록되고 서버에서 시작됩니다. 배포된 캐시 서비스가 등록되면 관리자가 중앙 관리의 서버 제공 서비스 페이지에서 배포된 캐시 서비스를 볼 수 있습니다.

다음 절차에 따라 서버를 캐시 클러스터에 추가하고 캐시 클러스터에서 제거합니다. 이러한 SharePoint 관리 셸 cmdlet은 추가 또는 제거되는 서버에서 실행됩니다.

참고

다음 절차를 수행하기 전에 방화벽에서 인바운드 ICMP(ICMPv4) 트래픽을 허용하는지 확인합니다. 자세한 내용은 방화벽 구성 고려 사항을 참조하세요.

SharePoint 관리 셸을 사용하여 캐시 클러스터에 서버 추가 및 분산 캐시 서비스 시작

이렇게 하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

Add-SPDistributedCacheServiceInstance

SharePoint 관리 셸을 사용하여 캐시 클러스터에서 서버 제거

이렇게 하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

Remove-SPDistributedCacheServiceInstance

중요

이 절차를 수행하면 캐시 서비스가 중지되고 캐시된 비영구 데이터가 손실됩니다. 캐시된 데이터를 유지하려는 경우 다음 섹션에 설명된 정상 종료 절차를 사용하세요.

PowerShell 스크립트를 사용하여 분산 캐시 서비스의 정상 종료 수행

SharePoint Server 팜에서 하나 이상의 캐시 호스트가 분산 캐시 서비스를 실행할 때 캐시 클러스터가 존재합니다. SharePoint Server 팜에는 하나의 캐시가 있고 캐시는 캐시 클러스터에 걸쳐 있습니다. 관리자는 서버에 업데이트를 적용할 때 캐시된 콘텐츠를 다른 캐시 호스트로 이동해야 할 수 있습니다. 캐시된 콘텐츠 이동과 관련된 데이터 손실을 방지하려면 다음 절차에서 PowerShell 스크립트를 사용하여 서버를 정상적으로 종료해야 합니다. 정상 종료 절차에서는 해당 절차를 실행할 캐시 호스트의 모든 캐시된 데이터를 팜의 다른 캐시 호스트로 전송합니다. 전송 프로세스는 캐시에 포함된 항목 수에 따라 실행 시간이 15분 이상 걸립니다.

PowerShell 스크립트를 사용하여 분산 캐시의 정상 종료를 수행하려면

캐시된 콘텐츠를 다른 캐시 호스트로 이동하기 위해 분산 캐시 서버의 정상 종료를 수행하려면 다음 PowerShell 스크립트를 사용합니다. 종료할 올바른 노드를 지정하고 필요에 따라 스크립트를 변경하여 organization 대한 올바른 매개 변수의 이름을 지정해야 합니다.

참고

다음 절차의 PowerShell 스크립트를 사용하여 정상 종료를 수행하는 경우 캐시 클러스터에서 캐시 호스트를 제거할 필요가 없습니다.

참고

SharePoint Server 구독 버전 정상 종료를 위해 스크립트를 실행 ps 하지 마세요. 대신 매개 변수를 사용하여 Stop-SPDistributedCacheServiceInstance-Graceful 를 실행하여 실행합니다.

  1. 다음과 같은 최소 요구 사항을 충족하는지 확인합니다.

  2. 다음 변수 선언을 복사하여 메모장 같은 텍스트 편집기에 붙여 넣습니다. 조직에 관련된 매개 변수 값을 설정합니다. 파일을 저장하고 이름을 로 지정합니다 GracefulShutdown.ps1.

    참고

    다른 파일 이름을 사용할 수 있지만 확장 .ps1명을 사용하여 ANSI로 인코딩된 텍스트 파일로 파일을 저장해야 합니다.

    ## Settings you may want to change for your scenario ##
    $startTime = Get-Date
    $currentTime = $startTime
    $elapsedTime = $currentTime - $startTime
    $timeOut = 900
    Use-CacheCluster
    try
    {
        Write-Host "Shutting down distributed cache host."
     $hostInfo = Stop-CacheHost -Graceful -CachePort 22233 -ComputerName sp2016App.contoso.com
     while($elapsedTime.TotalSeconds -le $timeOut-and $hostInfo.Status -ne 'Down')
     {
         Write-Host "Host Status : [$($hostInfo.Status)]"
         Start-Sleep(5)
         $currentTime = Get-Date
         $elapsedTime = $currentTime - $startTime
         $hostInfo = Get-CacheHost -HostName SP2016app.contoso.com -CachePort 22233
     }
     Write-Host "Stopping distributed cache host was successful. Updating Service status in SharePoint."
     Stop-SPDistributedCacheServiceInstance
     Write-Host "To start service, please use Central Administration site."
    }
    catch [System.Exception]
    {
     Write-Host "Unable to stop cache host within 15 minutes." 
    }
    

    여기서 sp2016App.contoso.com 사용하는 분산 캐시 서버의 컴퓨터 도메인 이름입니다.

  3. SharePoint 관리 셸을 엽니다.

  4. 파일을 저장한 디렉터리로 변경합니다.

  5. PowerShell 명령 프롬프트에 다음 명령을 입력합니다.

    ./GracefulShutdown.ps1
    

    PowerShell 스크립트 및 .ps1 파일에 대한 자세한 내용은 Windows PowerShell 스크립트 실행을 참조하세요.

서비스 계정 변경

서버 팜을 처음 구성하면 서버 팜 계정이 AppFabric 캐싱 서비스/SharePoint 캐싱 서비스의 서비스 계정으로 설정됩니다. 분산 캐시 서비스는 AppFabric 캐싱 서비스/SharePoint 캐싱 서비스에 따라 달라집니다. AppFabric 캐싱 서비스/SharePoint 캐싱 서비스의 서비스 계정을 관리되는 계정으로 변경하려면 다음을 수행합니다.

서비스를 선택하여 서비스 계정을 변경합니다.

  1. 관리되는 계정을 만듭니다.

  2. 관리 계정을 SharePoint 캐싱 서비스에서 서비스 계정으로 설정합니다. 이렇게 하려면 SharePoint 관리 셸 명령 프롬프트에서 다음 명령을 실행합니다.

    $farm = Get-SPFarm
    $cacheService = $farm.Services | where {$_.Name -eq "SPCache"}
    $accnt = Get-SPManagedAccount -Identity domain_name\user_name
    $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
    $cacheService.ProcessIdentity.ManagedAccount = $accnt
    $cacheService.ProcessIdentity.Update() 
    $cacheService.ProcessIdentity.Deploy()
    

    여기서 Domain_name\user_name SharePoint 관리 계정의 도메인 이름 및 사용자 이름입니다.

PowerShell 스크립트를 사용하여 분산 캐시 서비스 미세 조정

모니터링

분산 캐시 서버의 성능 카운터를 모니터링하여 캐시 성능 문제를 더 잘 이해할 수 있습니다. 일반적으로 문제를 해결하는 데 유용한 카운터 중 일부는 다음과 같습니다.

  1. 캐시 서비스에서 사용한 %cpu입니다.

  2. 캐시 서비스별 GC에 소요된 %시간.

  3. 총 캐시 누락/초 - 여기서 높은 값은 캐시에서 데이터를 가져올 수 없기 때문에 애플리케이션 성능이 저하될 수 있음을 나타낼 수 있습니다. 이에 대한 가능한 원인으로는 캐시에서 항목 제거 및/또는 만료가 포함됩니다.

  4. 총 개체 수 - 캐시에 있는 항목 수에 대한 아이디어를 제공합니다. 개체 수가 크게 감소하면 제거 또는 만료가 발생할 수 있습니다.

  5. 총 클라이언트 reqs/초 - 이 카운터는 애플리케이션에서 캐시 서버에서 생성되는 부하의 양을 파악하는 데 유용합니다. 여기서 값이 낮다는 것은 일반적으로 캐시 서버 외부(애플리케이션 또는 네트워크)에서 일종의 병목 상태를 의미하므로 캐시 서버에 로드가 거의 배치되지 않습니다.

  6. 제거된 총 개체 - 캐시 서버가 캐시의 최신 개체를 위한 공간을 확보하기 위해 항목을 지속적으로 제거하는 경우 일반적으로 애플리케이션에 대한 데이터 세트를 보관하기 위해 캐시 서버에 더 많은 메모리가 필요하다는 것을 나타내는 좋은 표시입니다.

  7. 총 실패 예외/초 및 총 재시도 예외/초

MaxConnectionsToServer 에 대한 분산 캐시 서비스 설정은 종종 호스트 컴퓨터에서 사용되는 CPU 수에 따라 조정됩니다. instance 경우 여러 코어를 사용한 다음 MaxConnectionsToServer 설정을 동일한 수의 CPU로 설정한 다음 컴퓨터에서 메모리를 너무 많이 사용하고 중지하는 경우가 많습니다. DistributedLogonTokenCacheDistributedViewStateCache 설정을 조정할 때 비슷한 문제가 발생합니다. 기본 설정은 20ms이지만 토큰 캐싱이 20ms 설정에서 발생하지 않는 경우 예외가 발생하는 경우가 많습니다. 다음 PowerShell 스크립트를 사용하여 SharePoint Server 2016 및 SharePoint Server 2013에서 최대 연결 및 시간 제한에 대한 설정을 변경합니다.

PowerShell스크립트를 사용하여 분산 캐시 서비스를 미세 조정하려면

  1. 다음과 같은 최소 요구 사항을 충족하는지 확인합니다.

  2. 다음 변수 선언을 복사하여 메모장 같은 텍스트 편집기에 붙여 넣습니다. 조직에 관련된 매개 변수 값을 설정합니다. 파일을 저장하고 이름을 로 지정합니다 MaxConnections.ps1.

    참고

    다른 파일 이름을 사용할 수 있지만 확장 .ps1명을 사용하여 ANSI로 인코딩된 텍스트 파일로 파일을 저장해야 합니다.

    PowerShell 스크립트 SharePoint Server 구독 버전 및 SharePoint Server 2019

    Add-PSSnapin Microsoft.Sharepoint.Powershell -ea 0
    
    #DistributedLogonTokenCache
    $DLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache
    $DLTC.MaxConnectionsToServer = 1
    $DLTC.requestTimeout = "3000"
    $DLTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache $DLTC
    
    #DistributedViewStateCache
    $DVSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache
    $DVSC.MaxConnectionsToServer = 1
    $DVSC.requestTimeout = "3000"
    $DVSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache $DVSC
    
    #DistributedAccessCache
    $DAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache
    $DAC.MaxConnectionsToServer = 1
    $DAC.requestTimeout = "3000"
    $DAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache $DAC
    
    #DistributedActivityFeedCache
    $DAF = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache
    $DAF.MaxConnectionsToServer = 1
    $DAF.requestTimeout = "3000"
    $DAF.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache $DAF
    
    #DistributedActivityFeedLMTCache
    $DAFC = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache
    $DAFC.MaxConnectionsToServer = 1
    $DAFC.requestTimeout = "3000"
    $DAFC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache $DAFC
    
    #DistributedBouncerCache
    $DBC = Get-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache
    $DBC.MaxConnectionsToServer = 1
    $DBC.requestTimeout = "3000"
    $DBC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache $DBC
    
    #DistributedDefaultCache
    $DDC = Get-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache
    $DDC.MaxConnectionsToServer = 1
    $DDC.requestTimeout = "3000"
    $DDC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache $DDC
    
    #DistributedSearchCache
    $DSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache
    $DSC.MaxConnectionsToServer = 1
    $DSC.requestTimeout = "3000"
    $DSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache $DSC
    
    #DistributedSecurityTrimmingCache
    $DTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache
    $DTC.MaxConnectionsToServer = 1
    $DTC.requestTimeout = "3000"
    $DTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache $DTC
    
    #DistributedServerToAppServerAccessTokenCache
    $DSTAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache
    $DSTAC.MaxConnectionsToServer = 1
    $DSTAC.requestTimeout = "3000"
    $DSTAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache $DSTAC
    
    #DistributedFileLockThrottlerCache
    $DFLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedFileLockThrottlerCache
    $DFLTC.MaxConnectionsToServer = 1
    $DFLTC.requestTimeout = "3000"
    $DFLTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedFileLockThrottlerCache $DFLTC
    
    #DistributedSharedWithUserCache
    $DSWUC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSharedWithUserCache
    $DSWUC.MaxConnectionsToServer = 1
    $DSWUC.requestTimeout = "3000"
    $DSWUC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSharedWithUserCache $DSWUC
    
    #DistributedUnifiedGroupsCache
    $DUGC = Get-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedGroupsCache
    $DUGC.MaxConnectionsToServer = 1
    $DUGC.requestTimeout = "3000"
    $DUGC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedGroupsCache $DUGC 
    
    #DistributedResourceTallyCache
    $DRTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedResourceTallyCache
    $DRTC.MaxConnectionsToServer = 1
    $DRTC.requestTimeout = "3000"
    $DRTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedResourceTallyCache $DRTC
    
    #DistributedHealthScoreCache
    $DHSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedHealthScoreCache
    $DHSC.MaxConnectionsToServer = 1
    $DHSC.requestTimeout = "3000"
    $DHSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedHealthScoreCache $DHSC  
    
    #DistributedDbLevelFailoverCache
    $DDBFC = Get-SPDistributedCacheClientSetting -ContainerType DistributedDbLevelFailoverCache
    $DDBFC.MaxConnectionsToServer = 1
    $DDBFC.requestTimeout = "3000"
    $DDBFC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedDbLevelFailoverCache $DDBFC
    
    #DistributedEdgeHeaderCache
    $DEHC = Get-SPDistributedCacheClientSetting -ContainerType DistributedEdgeHeaderCache
    $DEHC.MaxConnectionsToServer = 1
    $DEHC.requestTimeout = "3000"
    $DEHC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedEdgeHeaderCache $DEHC
    
    #DistributedFileStorePerformanceTraceCache
    $DFSPTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedFileStorePerformanceTraceCache
    $DFSPTC.MaxConnectionsToServer = 1
    $DFSPTC.requestTimeout = "3000"
    $DFSPTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedFileStorePerformanceTraceCache $DFSPTC
    
    #DistributedSPAbsBlobCache
    $DSPABSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSPAbsBlobCache
    $DSPABSC.MaxConnectionsToServer = 1
    $DSPABSC.requestTimeout = "3000"
    $DSPABSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSPAbsBlobCache $DSPABSC
    
    #DistributedSPCertificateValidatorCache
    $DSPCVC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSPCertificateValidatorCache
    $DSPCVC.MaxConnectionsToServer = 1
    $DSPCVC.requestTimeout = "3000"
    $DSPCVC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSPCertificateValidatorCache $DSPCVC
    
    #DistributedSPOAuthTokenCache
    $DSPOATC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSPOAuthTokenCache
    $DSPOATC.MaxConnectionsToServer = 1
    $DSPOATC.requestTimeout = "3000"
    $DSPOATC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSPOAuthTokenCache $DSPOATC
    
    #DistributedStopgapCache
    $DSGC = Get-SPDistributedCacheClientSetting -ContainerType DistributedStopgapCache
    $DSGC.MaxConnectionsToServer = 1
    $DSGC.requestTimeout = "3000"
    $DSGC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedStopgapCache $DSGC
    
    #DistributedUnifiedAppsCache
    $DUAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedAppsCache
    $DUAC.MaxConnectionsToServer = 1
    $DUAC.requestTimeout = "3000"
    $DUAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedAppsCache $DUAC
    
    #DistributedUnifiedAuditCache
    $DUAuC = Get-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedAuditCache
    $DUAuC.MaxConnectionsToServer = 1
    $DUAuC.requestTimeout = "3000"
    $DUAuC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedAuditCache $DUAuC
    

    SharePoint Server 2016 PowerShell 스크립트

    Add-PSSnapin Microsoft.Sharepoint.Powershell -ea 0
    
    #DistributedLogonTokenCache
    $DLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache
    $DLTC.MaxConnectionsToServer = 1
    $DLTC.requestTimeout = "3000"
    $DLTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache $DLTC
    
    #DistributedViewStateCache
    $DVSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache
    $DVSC.MaxConnectionsToServer = 1
    $DVSC.requestTimeout = "3000"
    $DVSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache $DVSC
    
    #DistributedAccessCache
    $DAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache
    $DAC.MaxConnectionsToServer = 1
    $DAC.requestTimeout = "3000"
    $DAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache $DAC
    
    #DistributedActivityFeedCache
    $DAF = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache
    $DAF.MaxConnectionsToServer = 1
    $DAF.requestTimeout = "3000"
    $DAF.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache $DAF
    
    #DistributedActivityFeedLMTCache
    $DAFC = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache
    $DAFC.MaxConnectionsToServer = 1
    $DAFC.requestTimeout = "3000"
    $DAFC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache $DAFC
    
    #DistributedBouncerCache
    $DBC = Get-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache
    $DBC.MaxConnectionsToServer = 1
    $DBC.requestTimeout = "3000"
    $DBC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache $DBC
    
    #DistributedDefaultCache
    $DDC = Get-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache
    $DDC.MaxConnectionsToServer = 1
    $DDC.requestTimeout = "3000"
    $DDC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache $DDC
    
    #DistributedSearchCache
    $DSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache
    $DSC.MaxConnectionsToServer = 1
    $DSC.requestTimeout = "3000"
    $DSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache $DSC
    
    #DistributedSecurityTrimmingCache
    $DTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache
    $DTC.MaxConnectionsToServer = 1
    $DTC.requestTimeout = "3000"
    $DTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache $DTC
    
    #DistributedServerToAppServerAccessTokenCache
    $DSTAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache
    $DSTAC.MaxConnectionsToServer = 1
    $DSTAC.requestTimeout = "3000"
    $DSTAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache $DSTAC
    
    #DistributedFileLockThrottlerCache
    $DFLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedFileLockThrottlerCache
    $DFLTC.MaxConnectionsToServer = 1
    $DFLTC.requestTimeout = "3000"
    $DFLTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedFileLockThrottlerCache $DFLTC
    
    #DistributedSharedWithUserCache
    $DSWUC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSharedWithUserCache
    $DSWUC.MaxConnectionsToServer = 1
    $DSWUC.requestTimeout = "3000"
    $DSWUC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSharedWithUserCache $DSWUC
    
    #DistributedUnifiedGroupsCache
    $DUGC = Get-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedGroupsCache
    $DUGC.MaxConnectionsToServer = 1
    $DUGC.requestTimeout = "3000"
    $DUGC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedUnifiedGroupsCache $DUGC 
    
    #DistributedResourceTallyCache
    $DRTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedResourceTallyCache
    $DRTC.MaxConnectionsToServer = 1
    $DRTC.requestTimeout = "3000"
    $DRTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedResourceTallyCache $DRTC
    
    #DistributedHealthScoreCache
    $DHSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedHealthScoreCache
    $DHSC.MaxConnectionsToServer = 1
    $DHSC.requestTimeout = "3000"
    $DHSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedHealthScoreCache $DHSC  
    

    SharePoint Server 2013 PowerShell 스크립트

    Add-PSSnapin Microsoft.Sharepoint.Powershell -ea 0
    
    #DistributedLogonTokenCache
    $DLTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache
    $DLTC.MaxConnectionsToServer = 1
    $DLTC.requestTimeout = "3000"
    $DLTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache $DLTC
    
    #DistributedViewStateCache
    $DVSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache
    $DVSC.MaxConnectionsToServer = 1
    $DVSC.requestTimeout = "3000"
    $DVSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache $DVSC
    
    #DistributedAccessCache
    $DAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache
    $DAC.MaxConnectionsToServer = 1
    $DAC.requestTimeout = "3000"
    $DAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedAccessCache $DAC
    
    #DistributedActivityFeedCache
    $DAF = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache
    $DAF.MaxConnectionsToServer = 1
    $DAF.requestTimeout = "3000"
    $DAF.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedCache $DAF
    
    #DistributedActivityFeedLMTCache
    $DAFC = Get-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache
    $DAFC.MaxConnectionsToServer = 1
    $DAFC.requestTimeout = "3000"
    $DAFC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedActivityFeedLMTCache $DAFC
    
    #DistributedBouncerCache
    $DBC = Get-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache
    $DBC.MaxConnectionsToServer = 1
    $DBC.requestTimeout = "3000"
    $DBC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedBouncerCache $DBC
    
    #DistributedDefaultCache
    $DDC = Get-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache
    $DDC.MaxConnectionsToServer = 1
    $DDC.requestTimeout = "3000"
    $DDC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedDefaultCache $DDC
    
    #DistributedSearchCache
    $DSC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache
    $DSC.MaxConnectionsToServer = 1
    $DSC.requestTimeout = "3000"
    $DSC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSearchCache $DSC
    
    #DistributedSecurityTrimmingCache
    $DTC = Get-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache
    $DTC.MaxConnectionsToServer = 1
    $DTC.requestTimeout = "3000"
    $DTC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedSecurityTrimmingCache $DTC
    
    #DistributedServerToAppServerAccessTokenCache
    $DSTAC = Get-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache
    $DSTAC.MaxConnectionsToServer = 1
    $DSTAC.requestTimeout = "3000"
    $DSTAC.channelOpenTimeOut = "3000"
    Set-SPDistributedCacheClientSetting -ContainerType DistributedServerToAppServerAccessTokenCache $DSTAC
    
  3. SharePoint 관리 셸을 엽니다.

  4. 파일을 저장한 디렉터리로 변경합니다.

  5. PowerShell 명령 프롬프트에 다음 명령을 입력합니다.

    ./MaxConnections.ps1
    

자세한 내용은 애플리케이션 구성 설정(Windows Server AppFabric 캐싱)을 참조하세요. Windows PowerShell 스크립트 및 .ps1 파일에 대한 자세한 내용은 Windows PowerShell 스크립트 실행을 참조하세요.

캐시 호스트 복구

설치, 구성 또는 유지 관리 작업 중에 배포된 캐시 서비스가 작동하지 않을 수 있습니다. 배포된 캐시 서비스 오작동의 증거는 중앙 관리의 상태 규칙에 표시되거나, 사용자가 SharePoint Server에서 배포된 캐시에 의존하는 기능을 사용할 때 표시됩니다. 예를 들어 사용자의 내 사이트에 대한 뉴스피드에서 오류를 보고하기 시작합니다. 또한 관리자가 배포된 캐시 서비스를 관리하기 위해 Null cmdlet을 실행할 때 "cacheHostInfo가 SharePoint 관리 셸입니다."란 오류 메시지가 표시될 수 있습니다.

캐시 호스트를 복구하는 과정은 두 단계로 진행됩니다.

작동하지 않는 분산 캐시 호스트에서 다음 절차를 사용하여 분산 캐시 호스트를 복원합니다.

  1. SharePoint 관리 셸 명령 프롬프트에서 Remove-SPDistributedCacheServiceInstance cmdlet을 실행합니다.

  2. SharePoint 관리 셸 명령 프롬프트에서 Add-SPDistributedCacheServiceInstance cmdlet을 실행합니다.

    참고

    1단계가 실패하는 경우 분산 캐시 서비스를 수동으로 제거하고 다음 단계를 사용합니다.

    • SharePoint 관리 셸 명령 프롬프트에서 다음 구문을 입력합니다.

      $instanceName ="SPDistributedCacheService Name=SPCache"
      
      $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
      
      If($serviceInstance -ne $null)
      {
      $serviceInstance.Delete()
      }
      
      
    • 분산 캐시 서비스가 수동으로 삭제된 후에는 2단계를 다시 실행합니다.

참고 항목

개념

SharePoint Server의 피드 및 분산 캐시 서비스 계획