a year ago
This is a stretch of a question (doubt the solution is on the Railway side of things), but just wanted to check as we have tried many other things at this point, especially app code changes. One of our Postgres database queries takes over 1 minute to complete and return data on production (we have a "regular" Railway environment called "production"), but the query takes only a few seconds locally and in Railway PR environments.
My question: are there discrepancies between regular Railway environment database services and PR environment database services that could cause drastic differences in query execution time? The environment variables are the same between prod and PR envs, the data is synced into PR envs (so production DB size matches PR env size), usage is about the same as we don't really have users right now (they are on break -- they follow school schedule)
9 Replies
a year ago
Hello,
Hardware is the same across all environments.
Silly question, but have you tried redeploying postgres?
This is great to know, makes sense and appreciate the clarification, and not a silly question. Might as well give it a shot 🙂 Thanks Brody
No dice, although I feel even stronger this is not a Railway issue based on the confirmation above. Something might be blocking the main thread in prod or something, but it seems this has to do with app setup or similar. Going to mark this as solved and keep debugging on our side
a year ago
ill leave this thread open for now incase you wanna bounce ideas off me
Thanks brother, we are good to close this. It's definitely app code, we measured locally and found some SQL optimization issues, working through it but definitely just on our end. Sometimes source of bug is quite obscure at first, as you know, and ours is symbolic of that because the execution time is flaky and highly variant lol
a year ago
sounds good to me!
a year ago
!s
Status changed to Solved brody • 12 months ago