2 days ago
Hi. I tried asking about this on the official Discord but didn't really get any help.
I'm developing a Next.js app hosted on Vercel. Since Railway offers a free trial, I decided to use it for testing and was extremely impressed with how well it performed.
My free month ended today, and since I'm planning to go into production, I subscribed to the Pro plan to continue my testing. This is when I started noticing that database interactions became very slow. I tried wiping everything and setting up the database again, but the result was the same. I can't figure out why the performance is so unstable.
To confirm, I added timers to one of my functions and ran the following tests, with these results:
Test 1:
1. Auth (newSession): 2.513ms
2. findUnique Paciente (newSession): 10.967ms
3. create Sesion (newSession): 1.045s
newSession Completo: 1.059s
Test 2:
1. Auth (newSession): 2.214ms
2. findUnique Paciente (newSession): 6.155ms
3. create Sesion (newSession): 56.565ms
newSession Completo: 65.456ms
Test 3:
1. Auth (newSession): 1.966ms
2. findUnique Paciente (newSession): 8.555ms
3. create Sesion (newSession): 6.934s
newSession Completo: 6.945s
This is for a very simple INSERT
operation (using Prisma) on a nearly empty database. My application is hosted on Vercel in Washington D.C. (US East), and the Railway database is also in US East (Virginia), so they are co-located. What strikes me the most is the wild difference in response times between these three identical tests, which were all executed within a one-minute span.
I'm somewhat new to this, so I apologize if this isn't the right place to ask, but on Discord, I was just told that my query was 'massive' or something similar without any further help.
2 Replies
2 days ago
Hey there! We've found the following might help you get unblocked faster:
๐งต PostgreSQL crashed due to 1GB volume limit โ urgent volume upgrade needed (Pro plan)
๐งต Database region change not working despite being on PRO plan
If you find the answer from one of these, please let us know by solving the thread!
2 days ago
Hi there, just wondering if the latency wasn't observed while you were on Trial โ was the data volume significantly different?
Status changed to Awaiting User Response Railway โข 1 day ago