Prisma: Can't reach database server
Hi, I am using Prisma + Next.js deployed on Vercel, and communicating over public network with my Railway SQL database. This has been working fine for me, however I started traveling overseas and now I am having a hard time developing or communicating with the database at all because I constantly receive
Can't reach database server at 'roundhouse.proxy.rlwy.net': 40050
. I have already looked through this Discord for solutions and implemented what was suggested here: https://stackoverflow.com/questions/68476229/m1-related-prisma-cant-reach-database-server-at-database5432, which helped a little bit but still inconsistent with my ability to connect + query. I believe this issue is very common for me now as I am in Asia and communicating with my db that is located in US East. How can I resolve or fix this? Is there something else I can do with Prisma to remedy this issue? My belief and reason for this post is that the issue is coming from Railway's ability to handle and serve requests that are across the globe and not near the region where most of my usage normally happens. Any help @Brody would be greatly appreciated, thank you!Stack Overflow
M1 Related! - Prisma: Can't reach database server at
database
:5432
Since I have moved to the new Apple Silicon architecture my docker setup with nextjs and postgres is not working anymore. The database inside the docker cannot be found by the nextjs server where I...
56 Replies
Project ID:
c4aab2e0-3c93-4c07-b086-ac5d458bd1b1
Railway is very good at handling requests from around the globe as they use edge proxies, you being in Asia means your request is handled by the edge proxy in Singapore and then routed internally to the us-east region.
but you can try to move the database to the Singapore region to reduce latency even further.
c4aab2e0-3c93-4c07-b086-ac5d458bd1b1
most of my customers are in US and east coast so that wouldn't make sense as solution, I just need to figure out how to connect + query consistently with Prisma when I am working abroad for the next few weeks
hmm okay, so you think this is specific to Prisma then?
tomorrow I could try interacting with the db directly outside of Prisma and see how performance/reliability is
it could be an issue with the network with your internet?
just wondering if seen others run into this issue before (specifically with Prisma) and there is a common fix
ok yeah it's getting late here so I will do a bit more testing tmrw
the only issues I've seen in this regard would be networking issues on the users side of things
but generally unable to develop my Next.js project because db connections fail consistently, but network wise I am able to take Zoom calls etc no problem
I have a dev instance of my Railway project
I will migrate that and see if it makes a noticeable difference
If it does though that would confirm its a Railway issue and nothing with my personal network or Prisma
sounds good
ok, ty for fast response as always!
appreciate it
no problem
My project sometimes has the same problem
I tried running
nc
command with both VPN off and on, seems to make a difference and works when its on
nc: connectx to 35.213.135.65 port 40050 (tcp) failed: Operation timed out
vs
Connection to 35.213.135.65 port 40050 [tcp/*] succeeded!
where are you vpn'ing to?
back to US
does your vpn have a Singapore region?