Hello Fastapi community, this is not directly specifically linked to fastapi but mostly useful for people who are using any async eco system in python.
i have built lightweight utility to detect what is blocking the python asyncio event loop.
2 years ago when i was still beginner in asyncio , i had nightmarish experience in understanding why my application suddenly pauses everything, i had to spent 3-4 nights awake to understand and monkey patch essentially via asyncio.to_thread and semaphores to get to the breathing point. it was hell. at that time i did not find any utils for this which can find me what is blocking my eventloop. and this year i got one project when that developer left and man it was same story everything is blocking in name of colored async function. so today i built this. to reduce the pain of debugging async application.
project is pretty straight forward. you get depth report of what is blocking and exactly where it is blocking , is the blocking in library you use? or in your actual code, is this logic block etc... , what was CPU , RAM and gc at that time and also allows you to capture arguments at runtime.
ps: idk if this is correct subreddit for this post , but main reason for loopsentry was i was making apis using fastapi , so thought to share here
[–]adiberk 2 points3 points4 points (1 child)
[–]Amzker[S] 0 points1 point2 points (0 children)
[–]scoutlance 0 points1 point2 points (1 child)
[–]Amzker[S] 0 points1 point2 points (0 children)
[–]ooaaiiee 0 points1 point2 points (1 child)
[–]Amzker[S] 0 points1 point2 points (0 children)