1
Vote

Memory Hike & Replicated Caching Issue

description

We have installed 3.0.5.1 and implemented Replicated Caching between two server for one of our c# based application. We are using .net version 2.0.50727.
 
We are facing two issues as below:
 
Issue 1: We have set CacheAmountOfObjects="500" but when we ran load test then we are observing that memory is not getting free. It goes above 1GB and ultimately we have to restart SharedCache server to release memory.
 
Issue 2: We have configured replicated caching between two server. After sometime of usage, we can see that objects are not in sync between two memcache server. This behavious is easily replicable when we run load test.
 
Any help to sort out above mentined issue would be highly appreciated as we are soon planning to deploy solution on our production environment.
 
Below is the server config file of "ast05" server name ( "ast06" server has ditto config except IP addr change):
 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<section name="replicatedSharedCache" type=" SharedCache.WinServiceCommon.Configuration.Server.IndexusServerProviderSection, &#xD;&#xA;          SharedCache.WinServiceCommon" />
</configSections>
<appSettings>
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
<serverSetting 
ServiceCacheIpAddress="10.38.43.47"
ServiceCacheIpPort="48888"
SharedCacheVersionNumber="3.0.5.1"
LoggingEnable="1"
ServiceFamilyMode="1"
CacheAmountOfObjects="500"
CacheAmountFillFactorInPercentage="90"
ServiceCacheCleanup="LRU"
ServiceCacheCleanupThreadJob="3600000"
TcpServerMaxThreadToSet="-1"
TcpServerMinThreadToSet="-1"
SocketPoolMinAvailableSize="5"
SocketPoolValidationInterval="00:02:00"
SocketPoolTimeout="00:02:00"
/>
<replicatedServers>
<add key="ast06" ipaddress="10.38.43.48" port="48888" />
</replicatedServers>
<providers>
  <add name="ServerSharedCacheProvider" type="SharedCache.WinServiceCommon.Provider.Server.IndexusServerSharedCacheProvider, SharedCache.WinServiceCommon">
  </add>
</providers>
</replicatedSharedCache>
<nlog autoReload="true" throwExceptions="true">
<targets async="true">
  <target name="shared_cache_general" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_general_log.txt" />
  <target name="shared_cache_traffic" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_traffic_log.txt" />
  <target name="shared_cache_tracking" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_tracking_log.txt" />
  <target name="shared_cache_sync" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_sync_log.txt" />
  <target name="shared_cache_memory" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_memory_log.txt" />
</targets>
<rules>
  <logger name="General" minlevel="Debug" writeTo="shared_cache_general" final="true" />
  <logger name="Traffic" minlevel="Debug" writeTo="shared_cache_traffic" final="true" />
  <logger name="Tracking" minlevel="Debug" writeTo="shared_cache_tracking" final="true" />
  <logger name="Sync" minlevel="Debug" writeTo="shared_cache_sync" final="true" />
  <logger name="Memory" minlevel="Debug" writeTo="shared_cache_memory" final="true" />
  <logger name="*" minlevel="Debug" writeTo="shared_cache_general" />
  <logger name="*" minlevel="Info" writeTo="shared_cache_general" />
</rules>
</nlog>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
  <providers>
    <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
  </providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
  <providers>
    <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
  </providers>
</roleManager>
</system.web>
</configuration>
 
Below is the client config file of "ast05" ( "ast06" client has ditto config except IP addr change):
 
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
<section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Client.IndexusProviderSection, SharedCache.WinServiceCommon"/>
</configSections>
 
<indexusNetSharedCache defaultProvider="IndexusSharedCacheProvider">
<clientSetting
SharedCacheVersionNumber="3.0.5.1"
LoggingEnable="0"
CompressionEnabled="0"
CompressionMinSize="1024000"                                                           
HashingAlgorithm="Hashing"
SocketPoolMinAvailableSize="5"
SocketPoolValidationInterval="00:02:00"
SocketPoolTimeout="00:02:00"/>
    <!-- 
    Hashing (default - is useless if your envrionment is using different versions of CLR's)
    Ketama
    FvnHash32
    FvnHash64
    -->
<servers>
 <add key="ast05"              ipaddress="10.38.43.47" port="48888"/>
  <!--<add key="Server01-Local"              ipaddress="192.168.1.10" port="48888" />-->
</servers>
<replicatedServers>
 <add key="ast06"                                ipaddress="10.38.43.48" port="48888"/> 
 <!-- only use this node in case you are using replication mode on server -->
 <!--<add key="Cluster02-Remote"                         ipaddress="192.168.1.11" port="48888" />-->
 <!--<add key="Cluster03-Remote"                         ipaddress="192.168.1.12" port="48888" />-->
</replicatedServers>
<providers>
    <add
    name="IndexusSharedCacheProvider"
    type="SharedCache.WinServiceCommon.Provider.Cache.IndexusSharedCacheProvider, SharedCache.WinServiceCommon"
   </add>
</providers>
</indexusNetSharedCache>
 
Thanks,
 
Nish

comments