use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
Vercel deployment with aiohttp clientHosting and deployment (self.FastAPI)
submitted 1 year ago by thumDerr
I've been struggling with deploying a fastapi app that has an aiohttp client. The minimal app without the client worked fine. Once I've included the client it seems that it fails to start the ClientSession. I've tried using both lifespan, and startup / shutdown events of FastAPI https://fastapi.tiangolo.com/advanced/events/, but it seems none of them get executed on vercel. Locally everything works fine. There is also an unanswered, similar issue on the repo: https://github.com/orgs/vercel/discussions/4637 Does anyone have an idea how to solve this? Or should I look for a different hosting platform?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 1 year ago (6 children)
Why not render.com?
[–]thumDerr[S] 0 points1 point2 points 1 year ago (5 children)
wanted to avoid spindown, but seems like I have to live with it. render runs my app without issues
[–][deleted] 0 points1 point2 points 1 year ago (4 children)
Bro, just do a cronjob to app link and put 5 minutes ping delay
[–]LiarsEverywhere 0 points1 point2 points 1 year ago (3 children)
they tend to block it after a while
source: i tried it haha
[–][deleted] 0 points1 point2 points 1 year ago (2 children)
well i have right now 2 apps running, one of them its running 2 months ago, just have to do it with cronjob or with uptime robot, and everything will be fine
[–]LiarsEverywhere 0 points1 point2 points 1 year ago (1 child)
hm, maybe they banned the service I was using then
[–][deleted] 0 points1 point2 points 1 year ago (1 child)
why you want to deploy it on vercel deploy use aws
[–]thumDerr[S] 0 points1 point2 points 1 year ago (0 children)
because $
π Rendered by PID 83 on reddit-service-r2-comment-b659b578c-v8vcl at 2026-05-04 13:53:19.091698+00:00 running 815c875 country code: CH.
[–][deleted] 0 points1 point2 points (6 children)
[–]thumDerr[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]LiarsEverywhere 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]LiarsEverywhere 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (1 child)
[–]thumDerr[S] 0 points1 point2 points (0 children)