Cannot close prepared statement

I'm not using CLOSE statement on my query
7 Replies
AJR
AJR2mo ago
Can you share or DM some example queries that you're using, and your Hyperdrive ID?
Agung Vivekananda
Agung VivekanandaOP2mo ago
I already DM you 🙏 Is the cause of problem because i don't put c.executionCtx.waitUntil(sql.end()) after execute the query?
AJR
AJR2mo ago
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.
Agung Vivekananda
Agung VivekanandaOP2mo ago
You are right, i use connection poolers. Currently supabase only support IPV6 for direct connection is Cloudflare Hyperdrive support IPV6?
elithrar
elithrar2mo ago
Yes - you can try it directly 🙂
thomasgauvin
thomasgauvin2mo ago
@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.
Agung Vivekananda
Agung VivekanandaOP2mo ago
Ahh okay thank you very much for your suggestion, i will use direct connection from now, hope this problem will gone

Did you find this page helpful?