Skip to main content
err:frontline:upstream:gateway_timeout
The gateway sent the request to the and didn’t get an answer in time. You get 504 Gateway Timeout.
Example response
Browsers get the same error as an HTML page.

If you’re calling an API hosted on Unkey

If the request is safe to repeat, retry with backoff. If it isn’t, ask the API owner whether it went through before you retry, because the app may have finished the work after the gateway stopped waiting. Send them the request ID.

If you own this API

Each request gets 15 minutes, and each connection attempt to an instance gets 10 seconds. If an instance is slow to accept a connection, the gateway tries your other instances first. A request your app already accepted isn’t retried. Common causes:
  • A route takes longer than 15 minutes to respond.
  • Instances are too slow to accept connections under load.

How to fix

  1. Find the slow route in the runtime logs and request log.
  2. Move long-running work off the request path, or stream the response so bytes reach the gateway before the deadline.
  3. If instances are slow to accept connections under load, add replicas or raise the CPU in the runtime settings.
Last modified on October 6, 2026