由于在基于formatted write的WSO2 Identity Server 5.1.0(类似于:distributed caching)中启用WSO2 JIRA IDENTITY-5050后出现内存泄漏,我想我会为我尝试不同的方法多个活动实例的集群(用于高可用性),通过禁用缓存和信任数据库,可以扩展到我的目的。
我通过下面的identity.xml禁用了很多缓存:
<CacheConfig>
<CacheManager name="IdentityApplicationManagementCacheManager">
<Cache name="AppAuthFrameworkSessionContextCache"
enable="false" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="AuthenticationContextCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="AuthenticationRequestCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="AuthenticationResultCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="AppInfoCache" enable="true" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="AuthorizationGrantCache" enable="false" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="OAuthCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="OAuthScopeCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="OAuthSessionDataCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="SAMLSSOParticipantCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="SAMLSSOSessionIndexCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="SAMLSSOSessionDataCache" enable="true" timeout="300" capacity="5000" isDistributed="false"/>
<Cache name="ServiceProviderCache" enable="true" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="ProvisioningConnectorCache" enable="true" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="ProvisioningEntityCache" enable="true" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="ServiceProviderProvisioningConnectorCache"
enable="true" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="IdPCacheByAuthProperty" enable="false" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="IdPCacheByHRI" enable="false" timeout="900" capacity="5000" isDistributed="false"/>
<Cache name="IdPCacheByName" enable="false" timeout="900" capacity="5000" isDistributed="false"/>
</CacheManager>
<CacheManager name="IDENTITY_LOGIN_DATA_CACHE_MANAGER">
<Cache name="IDENTITY_LOGIN_DATA_CACHE" enable="false" timeout="1" capacity="5000" isDistributed="false"/>
</CacheManager>
</CacheConfig>
但是我无法禁用使用IDENTITY_LOGIN_DATA_CACHE(在父类InMemoryIdentityDataStore中定义)的JDBCIdentityDataStore的缓存。这对于帐户锁定信息至关重要,在这段时间内,用户为其笔记本电脑使用不同的互联网连接(WIFI),然后他们会收到激活电子邮件(手机数据连接),并在激活后想知道为什么他们的帐户仍然被禁用。
除了我自己以外,我还可以提出建议: