Hi all -

We use Ignite in our production environment, But I found that the system
cache was increased slowly and never reclaim. when the free system memory
less than 200M, the node seemed did not work anymore and our system cannot
get any response from the server nodes. The image below is our server's
monitoring data:
<http://apache-ignite-users.70518.x6.nabble.com/file/t2000/WechatIMG86.jpeg> 

Our server nodes configuration is:

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:util="http://www.springframework.org/schema/util";
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd";>
    
    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi">
                <property name="zkConnectionString"
value="172.31.34.133:2181,172.31.32.111:2181,172.31.37.6:2181"/>
                <property name="sessionTimeout" value="30000"/>
                <property name="zkRootPath" value="/ignite/discovery"/>
                <property name="joinTimeout" value="10000"/>
            </bean>
        </property>

        <property name="gridLogger">
            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
            <constructor-arg type="java.lang.String" value="log4j2.xml"/>
            </bean>
        </property>

        <property name="communicationSpi">
            <bean
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
                <property name="localPort" value="47174"/>
                <property name="messageQueueLimit" value="1024"/>
            </bean>
        </property>

        <property name="dataStorageConfiguration">
            <bean
class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="defaultDataRegionConfiguration">
                    <bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="persistenceEnabled" value="true"/>
                        <property name="initialSize" value="#{512L * 1024 *
1024}"/>
                        <property name="maxSize" value="#{3L * 1024 * 1024 *
1024}"/>
                    </bean>
                </property>
                <property name="writeThrottlingEnabled" value="true"/>
                <property name="storagePath"
value="/var/lib/ignite/persistence"/>
                <property name="walPath" value="/wal"/>
                <property name="walArchivePath" value="/wal/archive"/>
            </bean>
        </property>
        <property name="includeEventTypes">
            <list>
                <util:constant
static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
                <util:constant
static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
                <util:constant
static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
            </list>
        </property>
    </bean>
</beans>

and the client nodes cache configuration is:
TcpCommunicationSpi communicationSpi =
DefaultIgniteConfiguration.getTcpCommunicationSpi(ignitePort);
cfg.setCommunicationSpi(communicationSpi);

//设备缓存配置
//BinaryObject 即com.tuya.athena.ignite.domain.DeviceStatusIgniteVO
CacheConfiguration<String, BinaryObject> cacheCfg = new
CacheConfiguration<>();
cacheCfg.setName("device_status");
//分区存储
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
//backup count
cacheCfg.setBackups(1);
cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cacheCfg.setCacheStoreFactory(FactoryBuilder.factoryOf(DeviceStatusCacheStore.class));
cacheCfg.setWriteThrough(true);
cacheCfg.setWriteBehindEnabled(true);
//flush every minutes
cacheCfg.setWriteBehindFlushFrequency(60 * 1000);
cacheCfg.setWriteBehindBatchSize(1024);
cacheCfg.setStoreKeepBinary(true);

cfg.setCacheConfiguration(cacheCfg);

ignite = Ignition.getOrStart(cfg);
ignite.cluster().active(true);

Is there any inappropriate place in my configuration? Looking forward to
your reply.

PS:



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to