-
Notifications
You must be signed in to change notification settings - Fork 96
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
On executing statement in asynchronous it would just hang? #239
Comments
I am experiencing the same issue on Mac additionally, all my 16 core of CPU is utilized 100%. OS: Mac OS 13.2.1 (22D68) / Intel 2,6 GHz 6-Core Intel Core i7 / 32 GB 2667 MHz DDR4 |
I am also experiencing this behavior. I'm running a tornado web server and during my authentication phase when I query the existing aiosqlite database to get the password hash, I can log before the connection but once the connection is attempted, the page hangs and no further logs are printed out. Web query is 'pending' for minutes. I'll try to get an example that shows this behavior. Gentoo Linux, Python 3.11.6, aiosqlite 019.0 EDIT: One issue I'm seeing is that when I have a function, the first connection and execute() statement works, but any additional connection and execute() statements seem to not (nothing else is called)
This also doesn't work:
Now I don't know if this is also a problem, this is also running in a daemon process. Another edit: This is all in a |
Not sure if this is related to tornado, or another coroutine/task stalling the event loop, but I can't reproduce this issue. Test code: https://gist.github.com/amyreese/de20d95f5d6697e427a5e8b7a035b298 Env:
Output:
|
I migrated my aiosqlite code to sqlite3 and it works fine, no hanging. I'll take a look at your example and see if I can create a reproducable example. |
Using your code, I wasn't able to reproduce the issue. Have you tried using my example to reproduce? If aiosqlite cannot run multiple aiosqlite commands in a daemon, that seems like a potentially useful use case that isn't being met. |
I think I know what went wrong, it's nothing to do with aiosqlite. I'll try re-utilizing it within my project. I found out by creating the database outside of the running daemon process and it would work and I could make multiple inserts before a selection in a web server route. Attaching a working version of my code. @kumarvimal @timelessnesses Do you have a minimal example that hangs? |
Description
So I tried making a function that write new records to the sqlite and when the function ran it just stuck
Note that only inserting printed out
Details
The text was updated successfully, but these errors were encountered: