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

server often throw "concurrent.futures._base.CancelledError" #2168

Closed
larryclean opened this issue Aug 4, 2017 · 3 comments
Closed

server often throw "concurrent.futures._base.CancelledError" #2168

larryclean opened this issue Aug 4, 2017 · 3 comments
Labels

Comments

@larryclean
Copy link

larryclean commented Aug 4, 2017

Long story short

i use aioredis to update data often throw "concurrent.futures._base.CancelledError" at aiohttp socket.io.
so my data can't update.

Expected behaviour

i expect can update redis data

Actual behaviour

    @sio.on('disconnect')
    async def disconnect(sid):
        """
        链接断开连接
        :param sid:
        :return:
        """
        await factory.leave_room(sid)
        rooms = sio.rooms(sid)
        for room in rooms:
            sio.leave_room(sid, room)
        await sio.eio.disconnect(sid)

Steps to reproduce

There is no recurrence method,but our production environment has this error

Your environment

centos
aiohttp 2.2.3
aioredis 0.3.3
python-socketio 1.8.0

@asvetlov
Copy link
Member

asvetlov commented Aug 4, 2017

See #2098 for behavior explanation

@asvetlov asvetlov closed this as completed Aug 4, 2017
@bluemix
Copy link

bluemix commented Apr 28, 2018

I was having two consecutive requests to the server, and I was having

...
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
concurrent.futures._base.CancelledError

so, I just placed await asyncio.sleep(0.1) between the requests and the above error is gone and everything worked correctly.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants