Java Hazelcast记录70%阈值消息,不向映射添加任何内容

Java Hazelcast记录70%阈值消息,不向映射添加任何内容,java,caching,cluster-computing,hazelcast,Java,Caching,Cluster Computing,Hazelcast,我在2节点集群中使用hazel cast,以下是我的配置: <hz:hazelcast id="hazelcast_instance"> <hz:config> <hz:instance-name>hazelcastinstance</hz:instance-name> <hz:group name="cluster" password="asdfg" />

我在2节点集群中使用hazel cast,以下是我的配置:

<hz:hazelcast id="hazelcast_instance">
        <hz:config>
            <hz:instance-name>hazelcastinstance</hz:instance-name>
            <hz:group name="cluster" password="asdfg" />
            <hz:properties>
                <hz:property name="hazelcast.health.monitoring.level">SILENT</hz:property>

            </hz:properties>
            <hz:network port="5710" port-auto-increment="false">
                <hz:join>
                    <hz:multicast enabled="false" multicast-group="224.2.2.5"
                        multicast-port="54327" />
                    <hz:tcp-ip enabled="true">
                        <hz:members>${cluster.hzmembers}</hz:members>
                    </hz:tcp-ip>
                </hz:join>
                <hz:interfaces enabled="false">
                    <hz:interface>192.168.1.*</hz:interface>
                </hz:interfaces>
            </hz:network>


            <hz:map name="cluster.map" max-size="100" max-idle-seconds="55"
                time-to-live-seconds="55"  eviction-policy="LRU" eviction-percentage="50"/>
        </hz:config>

    </hz:hazelcast>
但在日志中我一次又一次地看到这样的消息

[cluster] memory.used=1.8G, memory.free=583.9M, memory.total=2.4G, memory.max=2.4G, memory.used/total=76.07%, memory.used/max=76.07%, load.process=-1.00%, load.system=-1.00%, load.systemAverage=13.00%, thread.count=147, thread.peakCount=158, event.q.size=0, executor.q.async.size=0, executor.q.client.size=0, executor.q.operation.size=0, executor.q.query.size=0, executor.q.scheduled.size=0,
不确定是什么填充了hazelcast群集内存

任何dvice都将不胜感激


我正在使用Hazelcasr 3.1.7版

请升级到Hazelcast的最新版本;3.3.x。在3.1/3.2中,存在一些可能导致内存泄漏的问题;也许您遇到了其中一个问题


我不知道是什么在消耗你的记忆。我通常会做大量的分析。但首先尝试升级。

只需通过传递配置属性hazelcast.health.monitoring.level=OFF关闭healthmonitor线程即可

com.hazelcast.internal.monitors.HealthMonitor持有对com.hazelcast.spi.impl.proxyservice.impl.ProxyServiceImpl的硬引用,从而导致“代理”映射对象被收集,并最终使其超出范围


使用以下配置禁用日志<代码>配置=新配置()然后

config.setProperty("hazelcast.logging.type", "log4j2");
config.setProperty("hazelcast.health.monitoring.level", "OFF");

另一个选择是增加堆内存(-Xmx,-Xms),现在有了2.4G。
如果您可以分配3G(如果您有足够的可用内存),则警告消息将消失,最好避免OutOfMemoryError

我尝试使用3.3.3,但在2节点设置中大约24小时后仍然收到该消息。它越来越难得到内存转储,因为逐出踢的,它正在恢复正常。不确定是什么填充了hazelcast内存当70%的内存被使用时,健康监视器就会启动;这很可能是没有问题的,因为GC只是在感觉需要时删除了死对象。我添加的健康监测器是因为我们经常遇到客户问题,而对正在发生的事情一无所知;现在我们有一点反馈。但有时你会出现误报,如果你没有遇到任何问题;这可能是其中之一。我是否可以将阈值重置得更高一些,例如将内存使用率重置为90%?-Dhazelcast.health.monitoring.threshold.memory.percentage=无论什么
config.setProperty("hazelcast.logging.type", "log4j2");
config.setProperty("hazelcast.health.monitoring.level", "OFF");