Supabase Edge Function timing out on AI calls? The 150-second limit
Ship ItChecked against the official source
Source checked 30 Sept 2026 · Published 1 Oct 2026 · Last reviewed 1 Oct 2026 · By Ctrl+Z Therapy (how we test)
The short answer
Supabase Edge Functions have a time limit: 150 seconds on the Free plan and 400 on paid plans. If a function sends nothing back for 150 seconds, the request ends with a 504 error. Long AI answers can hit that, so the feature works on short prompts and fails on long ones.
What to do
- Answer right away with a job ID, and do the slow AI work in the background.
- Show the result when it's ready.
- Or stream the answer, so the user sees it as it arrives.
Source
Checked on 30 Sept 2026. Prices, limits and settings change, so check the source before you rely on them.