After check, I knew the reason.
The root cause is, the zk run in JAVA6, which  will keep constant pool in 
permgen. And at the same time, we enable JMX, which will make a string that 
will register the connection info into the constant pool, by new ObjectName in 
MBeanRegistry, which will call intern() for the new String.In our case, there 
are many conncections and connection many times, so there will be so many 
strings and which lead to full perm at last.
thanks

------------------------------------------------------------------发件人:superheizai
 <[email protected]>发送时间:2017年1月12日(星期四) 16:42收件人:[email protected] 
<[email protected]>; Chris Nauroth <[email protected]>主 
题:回复:would like to contribute to the zookeeper
Hey guys,
       Here I want to discuss the ZK permgen occupy too much space problem.     
     Recently, we encounter a  perm alarming which was triggered by zk occupy 
too much perm space. Actually, it occupy about 300M. When I dump all string,and 
found that, all strings are like 
"org.apache.ZooKeeperService:name0=ReplicatedServer_id3,name1=replica.3,name2=Follower,name3=Connections,name4=**.**.***.***,name5=0x3596daa0ad4e79a",name4
 was watcher IP.
    These string were registered jmx bean info.And , were registerd by 
org.apache.zookeeper.server.ServerCnxnFactory.registerConnection, am I right? 
How can I resolve this problem? Or, just let it be, and all these will be 
relcaimed when full GC occur?          Thanks.

        
 
------------------------------------------------------------------发件人:Chris 
Nauroth <[email protected]>发送时间:2015年11月18日(星期三) 
04:21收件人:[email protected] <[email protected]>; superheizai 
<[email protected]>主 题:Re: would like to contribute to the zookeeper
Hello Justin,

Thank you for your interest in ZooKeeper!  If you haven't already seen it,
then I recommend reading the guide on how to contribute.

https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute


Feel free to post patches on ZooKeeper JIRA issues that interest you.  If
there is any question about how to proceed on an issue, then please either
email the dev list again or discuss directly on the JIRA.

--Chris Nauroth




On 11/12/15, 1:06 AM, "superheizai" <[email protected]> wrote:

>Dear,
>    I'm Java Developer from China, and want to contribute some code to
>ZooKeeper. What do I need to do to get that?
>Justin Liu
>2015/11/12

Reply via email to