Closed
Description
Describe the bug
When running very large queries, I noticed the main loop in my program stopped responding.
I am coding a Discord bot (using discord.py, which is maintaining a gateway connexion), and running large queries result in the gateway being blocked, and the bot stops responding until the query is over.
To Reproduce
- Have a large enough table
- Create a task using
loop.create_task()
that only consists of printing on the standard output every second - Query all columns using
await TableName.all()
in a task or the main loop. This query in my case takes ~120 seconds - See that your messages from the other task stopped being printed during two minutes
Expected behavior
An async library should not block. When waiting for the query, the async task should be freed to let it take care of other jobs. It's literally performing the same as a sync library and creates huge problems in async apps that needs to scale.
Additional context
Metadata
Metadata
Assignees
Labels
No labels