#Issues with Prisma <> Postgres <> Railway?
16 messages · Page 1 of 1 (latest)
98f66160-ce86-4b15-a73b-cab912256208
how are you connecting to the database? try using the private network if you aren't already
I am using a conneciton_url through Prisma that is essentially just the pg user / password. Can you elabroate on the private network?
try using DATABASE_PRIVATE_URL
https://docs.railway.app/guides/postgresql#variables
https://docs.railway.app/reference/private-networking
Testing now, but i was hoping to have a solution that works even when running on localhost. As far as I know, 1000 queries in a 10 second query per user isn't anything crazy, right?
Just tested using the private database URL, this did not fix the issue and we are still seeing long load time
Any other ideas? @gleaming terrace
try making the same queries using raw SQL, as to eliminate prisma as the issue
I can try that. Do you have preferred typescript postgres client / lib that would be good to try this with?
I think the go to pg npm package would be more than sufficient
@gleaming terrace was able to confirm the issue still happens when using pg raw over prisma
and you are now connecting over the private network?
Yes! I set database_url to private_database_url in my env vars
is there some postgres config you can tweak? the postgres databases railway deploys are not managed in any way, they are just the bog standard postgres docker images provided by postgres with SSL on top
I see. I just tried saving our data to a local postgres server and I'm still running into this issue, so I agree it's likely not a railway specific config thing. What sorts of postgres config hve you seen for issues like this? I'm absolutely baffled so any help would be appreciated