zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsk-528 <wsk-...@163.com>
Subject Re:Re: Re: too many open files occur while the network cable is pulled out#zookeeper3.4.6#java client
Date Fri, 25 Dec 2015 08:12:44 GMT
did you meet the "too many open files" problem while you pulled out the cabble and the ulimit
is 100000?






在2015年12月23 07时55分, "Christopher"<ctubbsii@apache.org>写道:

I have mine set to 100000, but I would expect 60000 to be more than plenty.
Maybe there is something going on. Perhaps the ZK client is too
aggressively trying to re-establish a connection, instead of backing off?

On Mon, Dec 21, 2015 at 9:00 PM wsk-528 <wsk-528@163.com> wrote:

> yes, if the number of sockets not continues to grow unbounded,it's not a
> problem.
> the env of the client has set to 60000(ulimit -HSn 60000),is this value
> enough?
>
>
>
>
>
>
> 在2015年12月22 06时34分, "Christopher"<ctubbsii@apache.org>写道:
>
> I could see a concern if the number of sockets continues to grow unbounded,
> but if it levels off at some point, and the surge is only temporary, it
> might be better to just make sure you bump up your system's security limits
> for the number of open files ("nofile" in /etc/security/limits.{d/|conf}.
>
> This is something the Accumulo project has been recommending, and I've
> heard similar recommendations from Hadoop users, and other cloud and/or
> bigdata systems. The defaults in many systems are just too small to handle
> routine use cases.
>
> On Sun, Dec 20, 2015 at 3:58 PM wsk-528 <wsk-528@163.com> wrote:
>
> > hello:
> >     accidentally,i find a problem than the zookeeper client print "too
> > many open files" with server version 3.4.6, and i use the same java
> client
> > version.
> >     the env is like this:the server running on server A, and the client
> > running on server B(RHEL AS5), when i pull out the cable between them,
> the
> > client print "too many open files" ,and network unreachable.
> >     i test if i shutdown the network interface,the same log was printed.
> >     i use lsof -p <pid>,i can see a lot of socket file handle.
> >
> >
> >
> >
> >     my code is as following:
> >    public class ZKTest {
> >
> >
> > /**
> > * @param args
> > * @throws IOException
> > * @throws InterruptedException
> > * @throws KeeperException
> > */
> > public static void main(String[] args) throws IOException,
> > InterruptedException, KeeperException {
> > ZooKeeper zk = new ZooKeeper(args[0], 30000, new Watcher() {
> >
> >
> > @Override
> > public void process(WatchedEvent event) {
> > if(event.getState()==KeeperState.SyncConnected) {
> > System.out.println("connected...");
> > } else if(event.getState()==KeeperState.Disconnected) {
> > System.out.println("disconnected...");
> > } else if(event.getState()==KeeperState.Expired) {
> > System.out.println("expired...");
> > } else {
> > System.out.println("unknow " + event.getState());
> > }
> > }
> > });
> > zk.exists("/testpath", false);
> > Object o = new Object();
> > synchronized(o) {
> > o.wait();
> > }
> > }
> >
> >
> > }
> >
> >
> >
> >
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message