我有一项依赖Zookeeper的服务。但是,我使用Zookeeper遇到了OOM问题,可以看到以下错误:
ERROR NIOServerCnxnFactory.java (line 44) Thread Thread[ProcessThread(sid:5 cport:-1):,5,main] died
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:135)
at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
at org.apache.jute.BinaryOutputArchive.writeInt(BinaryOutputArchive.java:55)
at org.apache.zookeeper.txn.SetDataTxn.serialize(SetDataTxn.java:59)
at org.apache.zookeeper.server.quorum.Leader.propose(Leader.java:754)
at org.apache.zookeeper.server.quorum.ProposalRequestProcessor.processRequest(ProposalRequestProcessor.java:78)
at org.apache.zookeeper.server.PrepRequestProcessor.pRequest(PrepRequestProcessor.java:673)
at org.apache.zookeeper.server.PrepRequestProcessor.run(PrepRequestProcessor.java:131)
这个错误是什么意思?有人可以详细说明吗?
这个帖子死了有什么意义?
我还看到其他错误:
ERROR NIOServerCnxnFactory.java (line 44) Thread LearnerHandler Socket[addr=/10.196.128.11,port=47073,localport=2888] tickOfNextAckDeadline:1544 synced?:true queuedPacketLength:0 died
ERROR NIOServerCnxnFactory.java (line 44) Thread LearnerHandler Socket[addr=/10.196.128.13,port=59855,localport=2888] tickOfNextAckDeadline:1544 synced?:true queuedPacketLength:0 died
ERROR NIOServerCnxnFactory.java (line 44) Thread Thread[RMI RenewClean-[10.196.128.14:7400],5,system] died
ERROR NIOServerCnxnFactory.java (line 44) Thread Thread[RMI TCP Connection(idle),5,RMI Runtime] died
任何人都可以解释这些错误是什么意思吗?当这些线程死了会发生什么?
答案 0 :(得分:0)
ZooKeeper(或任何其他基于Java的进程)不应该尝试从java.lang.Error(如OOM)中恢复,所以除了重新启动JVM之外基本上没什么可做的,但是内存更多(google {{1 }})。
用于什么?别忘了ZK主要用于配置:每个znode最多可以容纳1 MB的数据,尽量在每个znode中存储最小的序列化对象。