Thanks. For the record the "A word or two about heartbeats" section at https://cwiki.apache.org/confluence/display/ZOOKEEPER/Troubleshooting covers how the ZK session timeout is handled.
On Thu, 10 Jan 2019 at 09:40 赖剑清 <laijianq...@tp-link.com.cn> wrote: > Hi, > > I think it's the zk client's problem. > > 1. Where the log producted: > > if (to <= 0) { > String warnInfo; > warnInfo = "Client session timed out, have not heard from server in " > + clientCnxnSocket.getIdleRecv() > + "ms" > + " for sessionid 0x" > + Long.toHexString(sessionId); > LOG.warn(warnInfo); > throw new SessionTimeoutException(warnInfo); > } > > 2. And the 'to' value came from : > > to = readTimeout - clientCnxnSocket.getIdleRecv(); > > 3. Then the 'readTimeout' is defined as: > > readTimeout = sessionTimeout * 2 / 3; > > Thus, the 'actually' sessionTimeout is 1333ms while > config:zookeeper.session.timeout=2000ms > > > >-----Original Message----- > >From: Mark Anderson [mailto:manderso...@gmail.com] > >Sent: Wednesday, January 9, 2019 11:34 PM > >To: users@kafka.apache.org > >Subject: Zookeeper timeout message in logs has value < configured timeout > > > >Hi, > > > >I'm experimenting with the value of zookeeper.session.timeout.ms in Kafka > >2.0.1. > > > >In my broker logs I see the following message > > > >[2019-01-09 15:12:01,246] WARN Client session timed out, have not heard > >from server in 1369ms for sessionid 0x200d78d415e0002 > >(org.apache.zookeeper.ClientCnxn) > > > >However, my zookeeper session timeout is configured as 2000ms. > > > >Why does the log file show a session timeout for a value less than what is > >configured? > > > >Thanks, > >Mark >