最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

FastAPI app on Heroku timing out after the third one - Stack Overflow

programmeradmin1浏览0评论

So I have a FastAPI instance on Heroku, using asyncmy for database, and also sending emails which is something I added recently. Now it times out all requests after the 3rd request, no errors nothing, but sometimes I get this.

2025-03-07T09:38:09.982758+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 30 seconds of SIGTERM

It fixes itself when I restart the dyno, but again times out after 3 requests. This is something that recently started after I added the email part, but I have no idea why that would cause it even if it isn't being called. I have 1 dyno on the basic plan, memory and load is below 50-60% all of the time.

Tried adding logging, pushing the emails onto a background task, switching to gunicorn (I was running it on Heroku first), added graceful shutdown config, still no idea what's wrong.

发布评论

评论列表(0)

  1. 暂无评论