im trying to deploy fastapi project with asyncio too, but if i add asyncio on requirements.txt vercel sererless is crashed it says like image below
vercel error
and if i see the deploy logs it says like this
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'vc__handler__python': invalid syntax (base_events.py, line 296)
Traceback (most recent call last):
File "/var/task/asyncio/base_events.py" Line 296
future = tasks.async(future, loop=self)
seem the asyncio is broken in vercel. If i deploy the project without asyncio in requirements.txt serverless work well
i need to know to solve this or maybe i can find alternative way to deploy fastapi project and asyncio in one project. thanks
Joko Santosi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.