Neon

N

Neon

The official Neon Database Discord

Join

🙏|feedback

❓|questions-and-answers

🐘|postgres

xenial-black
xenial-black9/26/2024

How to run migrations exactly once with Turborepo connected to multiple projects on Vercel?

I have a Turborepo with "web" and "api" apps, and a "db" package that's used by both apps. I also have 2 separate projects on Vercel, both are connected to this Turborepo. The "web" project is deploying the web app on "mysite.com", and the api project is deploying the api app on "api.mysite.com". The "db" package has the following npm script: ```...
frail-apricot
frail-apricot9/25/2024

SASL connection issues

I'm experiencing intermittent connection issues with my Neon using Drizzle and Next.js. When i'm not using connection pooling, I sometimes get a password authentication failed for user error. When using pooling, I encounter a SASL authentication failed error. I have 2 schemas with different users to manage user update in one schema and 2 users to manage payment in another private schema. The connection works sometimes but fails at other times(when not pooling). Can anyone provide guidance on how to resolve these authentication and connection issues? i've checked my connection string and made sure im copying it just like it is. this is how i'm using them for reference ```...
helpful-purple
helpful-purple9/20/2024

Prisma connection failing: Timed out fetching a new connection from the connection pool

Hello! Trying to deploy a lambda function that's using a container image running my node code containing prisma. When I hit any endpoint they will fail on reaching the database due to time out. Already red the docs and my params look like this sslmode=require&connect_timeout=15&connection_limit=20&pool_timeout=20...
foreign-sapphire
foreign-sapphire9/20/2024

Why does just having a connection open consume compute hours?

Hey, my system establishes a connection to execute requests faster - this consumes permanently compute hours, even tho nothing is being executed or simillar. Is this intended?
national-gold
national-gold9/19/2024

prisma migrations frequently fail with P1002 timeout

what it says on the tin. what can we do about that?
No description
flat-fuchsia
flat-fuchsia9/19/2024

Upgrade to additional storage on Free Plan?

Hi, I have a stack that's currently self-hosted on premises, that I run for a small local non-profit group. We have a postgres container with DBs used for Synapse (Matrix) and Keycloak - each of which gets very little traffic, but the Matrix DB is ~550MB. We want to move these services to a cloud server, but our maximum budget is ~$20/mo, which needs to cover both the DB, as well as the few small containers that access it. Neon looks very cool (I especially like the branch based workflow concept), and it seems to be a bit closer to the kind of "serverless" we're looking for (i.e. scale to "zero", rather than scale from 1->"infinite"). The only issue is that the storage limit is just a bit below what we need, and the "Launch" plan at $19/mo would use all of our budget with no room for the containers we need to run too . At that point, we're better off just running an EC2 with self-hosted postgres, or we could even get a small AWS Aurora instance for a bit cheaper than the Neon Launch plan. ...
absent-sapphire
absent-sapphire9/19/2024

How to acquire private .key for PEM certificate?

Neon.tech made a .pem certificate available through its documentation. I’m in need of a .p12/.pfx PKCS12 file for the platform I’m trying to integrate neon.tech with. How can I acquire a private key for this public key?
foreign-sapphire
foreign-sapphire9/17/2024

Local testing - compute limit nearly reached

I am just locally testing and for some reason I have already reached You've reached 88% of your monthly compute limit. How can this be/is this normal? Is there any way to reduce the amount it generates?...
stormy-gold
stormy-gold9/15/2024

How to serve users globally?

Hello 👋 NeonDB allows 1 database per project. Apart from read replicas, what should be an ideal strategy to minimize the latency that users from a different continent may have? For example, let's say we have a db based in Germany (EU) and the servers are located in Germany (EU) as well, users from the US would have high latency when hitting the API backend on EU....
adverse-sapphire
adverse-sapphire9/14/2024

Same DataType OID for all custom Postgres Types

The Neon Serverless Driver endpoint (proprietary wrapper built in Java) returns a DataTypeOID of 705 for all Postgres Custom Types.
No description
dependent-tan
dependent-tan9/12/2024

Recommendation for how to query 1.3 GB GeoJSON file with PostGIS

Hi all, I have a 1.3 GB GeoJSON file that I was thinking I could use Neon to query if a certain coordinate falls under any boundary defined in the GeoJSON file (once uploaded to Neon). Do you think this would be a good application to use neon + postgis? Or should I try to do this some other way....
ratty-blush
ratty-blush9/12/2024

Weird caching/stale results problem, Nextjs

For context, I am using Neon with Drizzle ORM in a deployed NextJS 14 app (appdir). I've written multiple simple queries that look like this: ``` import { lesson1Table, InsertLesson1Row } from "../schema";...
genetic-orange
genetic-orange9/12/2024

Free tier usage limit

My project can out data transfer limit for free tier, is it possible to get a pg_dump of the data within the database? I need to do some debugging and analysis via my local pc postgresql server of what went wrong. I missed the opptunity to do it before the transfer limit was reached.
genetic-orange
genetic-orange9/11/2024

delete parent branch

I applied some weird migrations on a child branch and promoted it to default. When I tried to delete the parent branch, it's impossible to do so. However there is no connection anymore between the parent and the child (the child has advanced a lot, both in terms of schema and data). Is it an anti-pattern? I thought that applying migrations to branches was the whole idea of branching for keeping prod safe. Is this fixable somehow?...
other-emerald
other-emerald9/11/2024

Is NeonDB a suitable option for geo-distributed database use cases, like YugabyteDB and CockroachDB?

Is NeonDB a suitable option for geo-distributed database use cases, where YugabyteDB and CockroachDB are commonly chosen, particularly for a B2B SaaS product with users across five continents? Can NeonDB handle latencies effectively in its current form, or are there any plans for improvements in future releases?
exotic-emerald
exotic-emerald9/10/2024

Chain of dependant branches, impossible to clean up

I've reset my main branch multiple times now using Point in Time recovery, each time it creates a new main_old branch that my main is now forked off of. I cannot clean up any of the main_old branches because they all have children cumulating in my production main branch. I cannot clean up any of my branches unless I somehow delete my production database. I am at a loss at what to do. I am slowly, but surely approaching my 500 branch limit. This cannot possibly be the right outcome. What am I doing wrong?...
ambitious-aqua
ambitious-aqua9/9/2024

How to use the serverless driver for regular postgres (in node.js)?

I have a SvelteKit app, that uses the Vercel or Node adapter depending on an environment variable. For the Vercel build we use Neon, but for the Node build, we want to use local postgres. Apparently I cannot do conditional paths in Sveltekit like the following cause the import itself causes the build to fail. ```...
quickest-silver
quickest-silver9/9/2024

You've reached your monthly storage limit.

Hi, I am trying out neon right now, just registered last night. Now it says that I've reached my monthly storage limit. I then deleted my databases, now even the whole project, to free up space, but the warning does not go away?
absent-sapphire
absent-sapphire9/7/2024

Shared compute for two completely different projects

I have two completely different projects (different sites, different tasks) that get less than a hundred thousand requests per day, so the CPU is only used at 0.02-0.05 percent, but 24/7. Does it make sense to combine it into one project, but two different databases, to make a compute shared?
national-gold
national-gold9/7/2024

OTEL tracing in serverless driver - does it exist yet?

Title basically says it all! I want to try and find a way to do OTEL tracing for a request lifecycle including queries. Curious if this has been implemented yet?