I'm testing a mobile app that hasn't been released yet, and I'm currently the only person using it. When I open it after the database has been idle for about a day, the first connection sometimes fails with what appears to be a timeout. The database is on an inexpensive serverless plan, so I suspect it is paused and needs time to start again. Is there a way to periodically wake it up or otherwise reduce the first-request delay? I'd prefer not to increase my Azure bill.
3 Answers
A scheduled VM or script could periodically connect and run a query, with retry logic for occasional startup delays. But there isn’t really a way to eliminate the cold start while keeping the database paused and free.
The cold start is the trade-off for serverless billing. If you keep it running continuously, the monthly compute cost can increase substantially, especially on a free or limited-use tier. For testing, it may be better to handle the first connection with a retry and a user-friendly loading message.
You can run a small query every couple of hours as a health check, or disable the automatic pause feature. However, keeping the database active means you’ll be charged for compute, so the periodic-query approach defeats much of the cost benefit of serverless.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures