This is a reproduction of the pool exhaustion problem with Edge Worker.
- Clone the repo
- Start Supabase
npx [email protected] startThis will createtest_seq,tasksqueue and will send 100k messages - Start Edge Runtime
npx [email protected] functions serve - Start Edge Worker
curl http://localhost:54321/functions/v1/workerProcessing should immediately start
Worker fails around 32-37k messages.
Check pooler logs with docker logs supabase_pooler-pool-exhaustion-repro
-
Clone the repo
-
Link a remote project
npx [email protected] link -
Reset remote db
npx [email protected] db reset --linked -
Set
EDGE_WORKER_DB_URLin Dashboard (Edge Functions > Secrets)Make sure to use Transaction Mode URL!
-
Deploy worker
npx [email protected] functions deploy -
Start worker
- replace
<project_ref>with your project ref
curl --request POST 'https://<project_ref>.supabase.co/functions/v1/worker' --header 'Content-Type: application/json'
(function is set to not verify JWT tokens, no need to supply ANON_KEY)
- replace
Check logs in dashboard