Fast API responses can hide execution delays
On the surface, everything looked healthy while the terminal tab was open and visible. But as soon as the developer switched to a customer storefront in another tab, the terminal expired.
When we checked the logs, successful requests were taking just 170–185ms. Even the server's rejection response arrived in a snappy 174ms. The server was responding promptly, but that wasn't the same as hearing from the browser promptly.
This happened in a local demonstration app built with Next.js, TypeScript, and SQLite. The business rule was simple: to accept incoming orders, staff had to maintain an active lease on the venue by sending periodic heartbeat requests.