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

Unknown AIOHttpConnection type errors #100

Open
smlbiobot opened this issue May 25, 2018 · 5 comments · May be fixed by #164
Open

Unknown AIOHttpConnection type errors #100

smlbiobot opened this issue May 25, 2018 · 5 comments · May be fixed by #164

Comments

@smlbiobot
Copy link

smlbiobot commented May 25, 2018

In my app which uses aioelasticsearch, I sometimes get these errors but I can’t figure out if there is something wrong with my app or the lib. Specifically, how do I interpret what is causing it / what it means?

python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 338, in perform_request
python:     ignore=ignore, timeout=timeout, headers=headers,
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 252, in _perform_request
python:     connection = await self.get_connection()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 236, in get_connection
python:     return self.connection_pool.get_connection()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/pool.py", line 96, in get_connection
python:     self.resurrect()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/pool.py", line 82, in resurrect
python:     self.dead.put_nowait((timestamp, connection))
python:   File "/usr/lib/python3.6/asyncio/queues.py", line 150, in put_nowait
python:     self._put(item)
python:   File "/usr/lib/python3.6/asyncio/queues.py", line 231, in _put
python:     heappush(self._queue, item)
python: TypeError: '<' not supported between instances of 'AIOHttpConnection' and 'AIOHttpConnection'
@hellysmile
Copy link
Member

What exact Python version You are using?

@hellysmile
Copy link
Member

Can You provide an example which fails this way?

@smlbiobot
Copy link
Author

I am using Python 3.6.2. Example is a bit hard for me to create as it generally happens on some background tasks that I am running. And 99% of those tasks run successfully, but it fails every now and then. The actual code is something very simple:

    await es.index(
        index=es_index_name('player_stats'),
        doc_type="player_stats",
        body=body,
        id=body.get('id'),
    )

where body is just a dict.

My main question is: What does this class do exactly? Does it have to do with available connection pool / timeouts for ES?

If it’s related to timeout, I will try to see if I should add nodes. But I have already seen previously that when it timeouts, it throws the timeout exception. I tried reading through the source but I am not proficient enough to debug this.

@hellysmile
Copy link
Member

I found an issue, seems queue.PriorityQueue and asyncio.PriorityQueue works little bit different , which was ported from original driver. Ill try to provide a fix for that this weekend

@smlbiobot
Copy link
Author

Sweet—thank you!

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

Successfully merging a pull request may close this issue.

2 participants