Yes! We solved this problem by setting the GC parameters last night, and
it has not occurred yet.
Some of the GC lasts for thirty seconds, this is the crux of the problem.
Thanks a lot!
-------- 原始信件 --------
*发件人*: Ted Dunning <[email protected]
<mailto:ted%20dunning%20%[email protected]%3e>>
*收件人*: [email protected] <mailto:[email protected]>
*抄送*: xuemin.luo <[email protected]
<mailto:%22xuemin.luo%22%20%[email protected]%3e>>
*主题*: Re: Why I always get session expired?
*日期*: Wed, 22 Dec 2010 10:27:53 -0800
This is almost always due to garbage collection issues.
Turn on GC logging and see if that is the problem.
On Wed, Dec 22, 2010 at 2:25 AM, Chang Song <[email protected]
<mailto:[email protected]>> wrote:
I think your session timeout value is too low, 4 sec.
Your actual timeout for each ensemble is 1.333 sec, and it only
retries twice until expiry.
Do you have a firewall or L4 switch between the client and the ZK
ensemble?
Maybe TCP idle session killer between in action.
Chang
Dec 22, 2010, 4:13 PM, shangmin 작성:
> Hi all,
>
> I need your help! I'm a new user of ZooKeeper, I start a zookeeper
client which connects to ZooKeeper and create a EPHEMERAL node on it.I
want to keep this connection until my client program exit. But after
some time, (30 minutes to more than one hour), the connection was closed
by ZooKeeper server, and the EPHEMERAL node disappeared, the following
is the related logs:
>
> 2010-12-22 14:44:32,002 - INFO [SessionTracker:zookeeperser...@315] -
Expiring session 0x12d0bd88fb20012, timeout of 4000ms exceeded
> 2010-12-22 14:44:32,003 - INFO
[ProcessThread:-1:preprequestproces...@385] - Processed session
termination for sessionid: 0x12d0bd88fb20012
> 2010-12-22 14:44:59,802 - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:nioservercnxn$fact...@250
<http://0.0.0.0/0.0.0.0:2181:nioservercnxn$fact...@250>] - Accepted
socket connection from /10.22.200.56:46376 <http://10.22.200.56:46376>
> 2010-12-22 14:44:59,802 - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:nioserverc...@769
<http://0.0.0.0/0.0.0.0:2181:nioserverc...@769>] - Client attempting to
renew session 0x12d0bd88fb20012 at /10.22.200.56:4 <http://10.22.200.56:4>
> 6376
> 2010-12-22 14:44:59,803 - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:nioserverc...@1572
<http://0.0.0.0/0.0.0.0:2181:nioserverc...@1572>] - Invalid session
0x12d0bd88fb20012 for client /10.22.200.56:46376
<http://10.22.200.56:46376>, prob
> ably expired
> 2010-12-22 14:44:59,803 - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:nioserverc...@1434
<http://0.0.0.0/0.0.0.0:2181:nioserverc...@1434>] - Closed socket
connection for client /10.22.200.56:46376 <http://10.22.200.56:46376>
which had sess
> ionid 0x12d0bd88fb20012
>
> I want to know why this happens, and how to solve this problem if I
want to keep the connection until the program exits?
> Thanks a lot!
>
> My zookeeper config file is:
>
> # The number of milliseconds of each tick
> tickTime=2000
> # The number of ticks that the initial
> # synchronization phase can take
> initLimit=10
> # The number of ticks that can pass between
> # sending a request and getting an acknowledgement
> syncLimit=5
> # the directory where the snapshot is stored.
> dataDir=/data/xce/zookeeper-data
> # the port at which the clients will connect
> clientPort=2181
>
> server.1=10.22.206.154:2888:4000
> server.2=10.22.206.155:2888:4000
>
>
> --
> Jesse Shang 尚敏
> 人人网技术部
>
> Mobile: +86 13811101579
> E-mail: [email protected] <mailto:[email protected]>
> Address: 26/F Jing An Center No.8 North Third Ring Road East Chao
Yang District,Beijing.CHINA 100028
> 北京市朝阳区北三环东路8号静安中心26层 100028
>