memcache heartbeat property not working

59 views
Skip to first unread message

Ravi kiran Varre

unread,
Nov 17, 2012, 10:57:02 AM11/17/12
to xmemc...@googlegroups.com
Hi , 

I am using xemcached 1.3.8 with repcached replication on it .
I m using KetamamemcachedSessionLocator , with failure mode off .
Inside my code i have set setEnableHeartBeat(false); to false and also i am passing , environment variable through script -Dxmemcached.heartbeat.max.fail.times=2

But still in case if one server is down in cluster , it is continuously trying to connect to that server .

please let me know how can i make this try to reconnect only for 2 times .

dennis zhuang

unread,
Nov 19, 2012, 1:34:18 AM11/19/12
to xmemc...@googlegroups.com
You can not forbid xmemcached's reconnect feature.It is no matter with heartbeating.
 

2012/11/17 Ravi kiran Varre <ravikir...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "xmemcached" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xmemcached/-/hnYPuVaQl7EJ.
To post to this group, send email to xmemc...@googlegroups.com.
To unsubscribe from this group, send email to xmemcached+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xmemcached?hl=en.



--
庄晓丹
Email:        killm...@gmail.com xzh...@avos.com
Site:           http://fnil.net
Twitter:      @killme2008



dennis zhuang

unread,
Nov 19, 2012, 2:09:22 AM11/19/12
to xmemc...@googlegroups.com
But you can set the heal session interval to be a great value by:

MemcachedClient.setHealSessionInterval( timeInMilliseconds)

2012/11/19 dennis zhuang <killm...@gmail.com>

dennis zhuang

unread,
Nov 19, 2012, 2:37:09 AM11/19/12
to xmemc...@googlegroups.com
I've commit a patch that provides a method named 'setEnableHealSession' to disable the reconnection,you can watch the difference at:


And i've added a unit test,it seems all is fine.You can build a jar by yourself if you want.The next release 1.3.9 may not come soon.


2012/11/19 dennis zhuang <killm...@gmail.com>

Kiran

unread,
Nov 19, 2012, 8:14:56 AM11/19/12
to xmemc...@googlegroups.com
Thanks a lot dennis , that was  a great help .
Reply all
Reply to author
Forward
0 new messages