I am using kazoo in project I am working on. But after some time I get an error message that new connection to zookeper cannot be opened.
So I wrote a little test program:
for i in range(0, 1000):
print i
zk = kazoo.client.KazooClient()
zk.start()
zk.stop()
And after around 500 iteration I've got an error: "Too many open files".
Am I using kazoo somehow wrong?
Call the
close()
method. From the documentation:However the example code within the same documentation doesn't call
close()
, so it's confusing.