#Issues with Prisma <> Postgres <> Railway?

16 messages · Page 1 of 1 (latest)

nocturne heathBOT
#

Project ID: 98f66160-ce86-4b15-a73b-cab912256208

supple locust
#

98f66160-ce86-4b15-a73b-cab912256208

gleaming terrace
#

how are you connecting to the database? try using the private network if you aren't already

supple locust
#

I am using a conneciton_url through Prisma that is essentially just the pg user / password. Can you elabroate on the private network?

gleaming terrace
supple locust
#

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

gleaming terrace
#

try making the same queries using raw SQL, as to eliminate prisma as the issue

supple locust
#

I can try that. Do you have preferred typescript postgres client / lib that would be good to try this with?

gleaming terrace
#

I think the go to pg npm package would be more than sufficient

supple locust
#

@gleaming terrace was able to confirm the issue still happens when using pg raw over prisma

gleaming terrace
#

and you are now connecting over the private network?

supple locust
#

Yes! I set database_url to private_database_url in my env vars

gleaming terrace
#

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

supple locust
#

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