Cannot close prepared statement
I'm not using CLOSE statement on my query
7 Replies
Can you share or DM some example queries that you're using, and your Hyperdrive ID?
I already DM you 🙏
Is the cause of problem because i don't put c.executionCtx.waitUntil(sql.end()) after execute the query?
No, that should not cause this specific issue.
Prepared statements are per-connection. It's trying to close a statement that the connection does not have.
Ohhhh. You're using supabase's pooler, I bet
Stacking multiple connection poolers can cause issues exactly like this. We recommend connecting Hyperdrive directly to your database.
You are right, i use connection poolers. Currently supabase only support IPV6 for direct connection
is Cloudflare Hyperdrive support IPV6?
Yes - you can try it directly 🙂
@Agung Vivekananda to add on to Matt's response, Hyperdrive will be able to connect to supabase's database directly (without the supabase connection pooler).
If you attempt to develop locally with your supabase database with
npx wrangler dev
, you may encounter errors in case your ISP does not support IPV6. If that is the case, consider using the npx wrangler dev --remote
option.Ahh okay thank you very much for your suggestion, i will use direct connection from now, hope this problem will gone