Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with KazooTimeout #593

Open
BaranOrnarli opened this issue Mar 5, 2020 · 3 comments
Open

Issue with KazooTimeout #593

BaranOrnarli opened this issue Mar 5, 2020 · 3 comments

Comments

@BaranOrnarli
Copy link

BaranOrnarli commented Mar 5, 2020

I have an issue where Kazoo client timesout. I'm using Kazoo through a library called pysolr.

Here's a link to the source code line number:

https://github.com/django-haystack/pysolr/blob/cbb68d3905cf2aa7dc9b3100dd9ec959e10add18/pysolr.py#L1509

I am using default settings but I've also tried a timeout=12 (less than the zk.start() timeout just to test), and I'm still getting the problem.

It's possible my host has intermittent connection issues but I don't see why the client won't handle it gracefully and just reconnect automatically like it implies in the "delay", "retry" parameters. Why does it just crash and stop trying?

I'm using Kazoo 2.6.1

@netan-porwal
Copy link

I am facing the same issue. It's further giving an OS error stating "too many files open"

@ceache
Copy link
Contributor

ceache commented Aug 4, 2020 via email

@netan-porwal
Copy link

Had checked pysolr's internal code for this. It worked fine for me by closing the zookeeper object which is created in class Zookeeper in pyslor.py file. In the documentation it says the following:

**

For SolrCloud mode, initialize your Solr like this:

zookeeper = pysolr.ZooKeeper("zkhost1:2181,zkhost2:2181,zkhost3:2181")
solr = pysolr.SolrCloud(zookeeper, "collection1", auth=)
**

Try using this after creating the above object.
solr.zookeeper.zk.stop()
solr.zookeeper.zk.close()

If you check kazoo's documentation, it says to close the created kazoo session to free any resources held by the client.
Kazoo Doc link: https://kazoo.readthedocs.io/en/latest/api/client.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants