缓存对象已被逐出 (SharePoint Server)

适用于:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

规则名称: 缓存对象已被删除

摘要: 当缓存主机上的缓存服务的内存使用量超过低水位线阈值时,说明已过期的对象仍处于活动状态。 当内存使用率超过高水位线阈值时,则说明对象已从内存中删除,不论其是否过期,直到内存使用量回到低水位线。 随后缓存的对象可能会被重新路由到其他主机,以维持内存的最佳分配。

原因:缓存群集中没有足够的内存。

解决方案:向服务器添加更多 RAM

  • You can add more RAM to the server to increase the memory. To identify the failing server: in the SharePoint Central Administration website, in the Monitoring section, click Review problems and solutions, and then find the name of the server in the Failing Servers list. If there are multiple failing servers in a server farm, you must repeat this resolution on each failing server.

解决方案:增加分布式缓存的内存分配

  1. 确认您具有以下成员身份:
  • SQL Server 实例上的 securityadmin 固定服务器角色。

  • 要更新的所有数据库上的 db_owner 固定数据库角色。

  • 运行 Microsoft PowerShell cmdlet 的服务器上的管理员组。

  • Farm Administrators 组。

    管理员可以使用 Add-SPShellAdmin cmdlet 授予使用 SharePoint Server cmdlet 的权限。

    注意

    [!注意] 如果您不具有这些权限,请联系您的安装管理员或 SQL Server 管理员来请求权限。 有关 PowerShell 权限的其他信息,请参阅 Add-SPShellAdmin

  1. 启动 SharePoint 命令行管理程序。

  2. 按照使用情况检查当前的分布式缓存设置。 为此,请运行下列命令:

    Get-SPDistributedCacheClientSetting

    有关详细信息,请参阅 Get-SPDistributedCacheClientSetting

  3. 在服务器场中的所有缓存主机上停止分布式缓存服务。 为此,请在每台缓存主机上运行以下命令:

    Stop-SPDistributedCacheServiceInstance -Graceful

    有关详细信息,请参阅在 SharePoint Server 中管理分布式缓存服务中的"正常关闭分布式缓存服务"。

  4. 要增加分布式缓存服务的缓存大小,请在 PowerShell 命令提示符处在任何缓存主机上仅运行以下命令一次:

    Update-SPDistributedCacheSize -CacheSizeInMB CacheSize

    其中:

  • CacheSize是缓存大小的内存分配(以 MB 为单位)。 默认值为系统总 RAM 的 5%。 在最大限制为 16 GB 的情况下,此值不应超过系统总 RAM 的 40%。
  1. Start the Distributed Cache service on all cache hosts. To start the Distributed Cache service, go to the Services on Server page in Central Administration, and start the Distributed Cache service on all cache hosts in the farm.

另请参阅

概念

在 SharePoint Server 中管理分布式缓存服务

在 SharePoint Server 中规划源和分布式缓存服务

其他资源

Update-SPDistributedCacheSize

规划和使用分布式缓存服务