当前位置: 首页 > 知识库问答 >
问题:

Hazelcast集群成员由于大量“isStillRunningService”对象而内存不足

徐旻
2023-03-14

我们有一个在3.5版本上利用Hazelcast IExecutor服务和IMap的系统。我们最近遇到了Hazelcast集群成员在生产中内存不足的情况,一个接一个,最后所有节点都被OOM崩溃。
在进行原因分析时,我们发现下面有数千个日志条目,日志文件大小呈指数级增长。存放原木的存储空间也已经用完。

WARNING: [10.7.90.189]:30103 [FB] [3.5] Asking if operation execution has been started: com.hazelcast.spi.impl.operationservice.impl.IsStillRunningService$InvokeIsStillRunningOperationRunnable@48b3ac3b
Mar 30, 2016 11:09:29 AM com.hazelcast.spi.impl.operationservice.impl.Invocation
WARNING: [10.7.90.189]:30103 [FB] [3.5] While asking 'is-executing': Invocation{ serviceName='hz:core:partitionService', op=com.hazelcast.spi.impl.operationservice.impl.operations.IsStillExecutingOperation{serviceName='hz:core:partition
Service', partitionId=-1, callId=59834, invocationTime=1459349279980, waitTimeout=-1, callTimeout=5000}, partitionId=-1, replicaIndex=0, tryCount=0, tryPauseMillis=0, invokeCount=1, callTimeout=5000, target=Address[1.2.3.4]:30102, b
ackupsExpected=0, backupsCompleted=0}
com.hazelcast.core.OperationTimeoutException: No response for 10000 ms. Aborting invocation! Invocation{ serviceName='hz:core:partitionService', op=com.hazelcast.spi.impl.operationservice.impl.operations.IsStillExecutingOperation{servic
eName='hz:core:partitionService', partitionId=-1, callId=268177, invocationTime=1459349295209, waitTimeout=-1, callTimeout=5000}, partitionId=-1, replicaIndex=0, tryCount=0, tryPauseMillis=0, invokeCount=1, callTimeout=5000, target=Addr
ess[10.7.90.190]:30102, backupsExpected=0, backupsCompleted=0} No response has been received!  backups-expected:0 backups-completed: 0
        at com.hazelcast.spi.impl.operationservice.impl.Invocation.newOperationTimeoutException(Invocation.java:491)
        at com.hazelcast.spi.impl.operationservice.impl.IsStillRunningService$IsOperationStillRunningCallback.setOperationTimeout(IsStillRunningService.java:224)
        at com.hazelcast.spi.impl.operationservice.impl.IsStillRunningService$IsOperationStillRunningCallback.onFailure(IsStillRunningService.java:219)
        at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture$1.run(InvocationFuture.java:137)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
        at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)

我知道,集群成员会不断发出心跳,以确保所有成员都活着,我相信默认值是10sec。现在的问题是,如果任何一个成员没有响应或处于休状态,其余的成员将继续进行is执行调用。在查看了堆转储之后,才知道>73%的堆中充满了“isStillRunningService”对象。

问题:

  1. 如何知道到底出了什么问题?
  2. 存储空间耗尽只是一种巧合还是可能有任何关联?我们怀疑,一个星期内发生了两次。
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.5.xsd"
           xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <map name="myMap">
        <backup-count>0</backup-count>
        <time-to-live-seconds>43200</time-to-live-seconds>
        <eviction-policy>LRU</eviction-policy>
        <max-size policy="USED_HEAP_PERCENTAGE">75</max-size>
        <eviction-percentage>10</eviction-percentage>
        <in-memory-format>OBJECT</in-memory-format>
    </map>

    <executor-service name="calculation">
            <pool-size>10</pool-size>
        <queue-capacity>400</queue-capacity>
    </executor-service>

    <executor-service name="loader">
            <pool-size>5</pool-size>
        <queue-capacity>400</queue-capacity>
    </executor-service>

    <properties>
        <property name="hazelcast.icmp.timeout">5000</property>
        <property name="hazelcast.initial.wait.seconds">10</property>
        <property name="hazelcast.connection.monitor.interval">5000</property>
    </properties>

    <network>
        <port auto-increment="true" port-count="100">30101</port>
        <join>
            <multicast enabled="false">
                <multicast-group>224.2.2.3</multicast-group>
                <multicast-port>54327</multicast-port>
            </multicast>
            <tcp-ip enabled="true">
                <interface>1.2.3.4</interface>
                <interface>1.2.3.5</interface>
                <interface>1.2.3.6</interface>
            </tcp-ip>
            <aws enabled="false"/>
        </join>
        <interfaces enabled="false">
            <interface>127.0.0.1</interface>
        </interfaces>
    </network>
</hazelcast>

共有1个答案

谢涵亮
2023-03-14

你能升级到3.6吗。添加了一些补丁,以防止使用is-stily-running运行到OOME。在3.7中,整个机制将被移除,取而代之的是一种问题较少的方法。

https://github.com/hazelcast/hazelcast/pull/7719

 类似资料:
  • 我正在进行一个Spring启动项目,我使用Hazelcast作为缓存。我启用了tcp作为连接方法,我还提到了一些成员。会员可以加入。但问题是其他节点也可以加入除了成员。有人能告诉我如何限制它吗? 这是我的配置,

  • 我使用的是Hazelcast 3.12。5我想知道我们是否可以在偶数个节点上运行hazelcast群集,或者需要/首选奇数个节点。如果我运行奇数个节点,是否会出现大脑分裂问题或类似情况/大脑分裂的可能性增加。 这可能是最基本的,但我想确定——我想从社区了解一些真实世界的经验。我不希望在四个节点足以完成任务的情况下,从三个节点增加到五个节点会产生成本,但同时,如果我们使用大小均匀的集群会有任何缺点,

  • 假设我有4台服务器(1,2,3,4)在嵌入式模式下运行,并启用了近缓存。每个服务器都运行一个hazelcast成员jvm和一个hazelcast客户机jvm。每个服务器上的成员jvm定义一个a的组名,集群成员定义为1、2、3、4。每个服务器上的客户机jvm定义相同的A组名,并将相同的集群成员定义为1、2、3、4。配置如下所示: 现在,假设我停止服务器1上的成员jvm,将成员配置中的组名更改为B并再

  • 我有一个配置类,它存储在hz IMap 这个配置类是1-st实例成员 P. S成员是两个不同的应用程序的一部分。 此配置作为对象从第一个集群成员推送到IMap 我的目标是在另一个模块中看到这个配置 如何在第二个成员实例中序列化该对象 如果调用 我得到了

  • 我正在做hazelcast监控服务,我需要为每个集群成员添加客户名称,以了解哪个模块不在集群中。 我想要成员的常量名称,而不是 这能做到吗?

  • 问题内容: 我们正在更改应用程序之一以使用Hazelcast 3.11 Community Edition,并在运行于少数主机上的多个JVM之间进行一些锁定。我们按照如下语法配置集群: 所有工作正常,并且群集已正确创建并按预期工作。 但是,我创建了一个单元测试并为本地集群配置了与应用程序使用的名称相同的名称,然后将开发人员计算机添加到其中。一切正常,我的本地主机没有任何问题地加入了应用程序集群。