I'm having this exact issue as well - I tried to resolve it over email but unfortunately haven't gotten anywhere so I found this old thread.
My Flask app occasionally takes an extra 3-5 seconds to load after a number of idle hours, after which point it's fine. This happens once every 1-2 days, and always coincides with the following printout in the server log:
2022-04-21 16:04:58 *** Starting uWSGI 2.0.19.1 (64bit) on [Thu Apr 21 16:04:57 2022] ***
The response I got from support was the following: "When we move web apps between machines (we do it once in a day or two) first hit triggers spinup."
I understand, but from the user's perspective waiting 3-5 seconds for the website to "spin up" creates a bad experience for them and therefore reflects poorly on me as the creator. I purposely uploaded a toy Flask app and stripped away anything that could possibily cause slow loading times on my end, and unfortunately this problem still persists.
Some additional info: I'm currently on a paid account with 2 workers per app and I'm the only one accessing this toy app, so this shouldn't be an issue. Also, the app's JS files are tiny (~8KB total) and the CSS file is ~50KB, so this shouldn't be an issue either (the files are kept in the 'static' directory anyways).
Please let me know if there's a solution for this - maybe scheduling a task to ping the app every hour to make sure it stays "warm", as Harry suggested above? (Though this still wouldn't solve the problem fully since there's a chance a user could access the app at an inopportune moment such that their "first hit triggers spinup" of the app and they experience the lag.)
Thanks!