Neon + Vercel Integration missmatch in the environment variables
I have the integration of neon and vercel in my NextJS project, everything was working fine until a couple of days ago that we started to see that the PG_HOST and DATABASE_URL do not match in the environment variables that neon sets in vercel.
Next steps:
- I push my branch to github
- it creates me a neon branch for my database
- the integration sets me the environment variables for the database for the environment of this branch
- the values of the environment variables are different in the domain
as you can see for fix/162-dashboard-checkpoint-fixes in the attached file the PG_HOST starts with ep_late ... and in the DATABASE_URL it starts with ep-steep

8 Replies
fascinating-indigo•2y ago
I can confirm that this happens also! I'm part of the same team as @JeroC
it seems that the
DATABASE_URL in vercel for the preview uses the wrong host ep-steep-recipe-62114743magic-amber•2y ago
Sorry to hear about this, adn thank you for creating this report. Can you confirm if it's only preview environments, or is it all environments?
Can you also confirm which value is incorrect? Is
DATABASE_URL what you expect it to be, and PGHOST is incorrect?fascinating-indigo•2y ago
the PGHOST value matches the host in the URL reported in Neon UI and DATABASE_URL has the wrong host
also we can confirm that it also happens in productio
@ShinyPokemon do you have any updates on this? Were you able to reproduce? Is there an ETA for a fix? Thanks!
exotic-emerald•2y ago
Hey @guidomb ! I think we've caught this. Is it possible that at one point the ENV was set manually with the protocol
postgresql? We're explicity looking for postgres right now which I think is the cause. We have a PR created that will avoid this in future that should make its way into production by next week.fascinating-indigo•2y ago
Not sure really, I tend to think that we haven't set it manually. Maybe @JeroC can confirm this
xenial-blackOP•2y ago
The only thing we do at one point of the development was change the database target of the integration, I deactivated and removed the integration and started again all the process to set the integration but changing the database target. Could it be related?
exotic-emerald•2y ago
Thanks. I guess we will never know where the
postgresql protocol came from - but the good news is we've now rolled out a fix.fascinating-indigo•2y ago
awesome, thanks