Should PrismaNeon adapter use pooler URL?
Following the example code here:
Should
process.env.DATABASE_URL be set to the pooler URL or the direct URL? Does using the adapter make the pooler unnecessary? Same question applies when using in Cloudflare.5 Replies
rare-sapphire•2y ago
For most use cases you should use the pooler
passive-yellow•2y ago
As Tristan says, you should generally use the pooler URL to prevent your application(s) from potentially exhausting your Postgres instance connection limits.
Using the non-pooler URL is sometimes necessary for performing schema migrations.
xenial-blackOP•2y ago
@Tristan Partin @ShinyPokemon thanks for the response! I figured that was the case. But I was looking at the new Cloudflare docs (https://neon.tech/docs/guides/cloudflare-workers) and the example URL used there was not a pooler URL, so it got me second-guessing myself...
Neon
Use Neon with Cloudflare Workers - Neon Docs
Cloudflare Workers is a serverless platform allowing you to deploy your applications globally across Cloudflare's network. It supports running JavaScript, TypeScript, and WebAssembly, making it a grea...
rare-sapphire•2y ago
@Daniel any reason we don't recommend the pooled url there?
equal-aqua•2y ago
That should be a pooled URL, I think. We'll update that.