Slow postgres queries

molhar
PRO

15 days ago

We are experiencing slow Postgres queries since being moved to Metal. We had previously seen this issue when running our staging environment on Metal too.

This is resulting in some requests to our API taking multiple seconds to complete and consequently having a severe impact on user experience (we are literally losing sign ups right now as a result).

Not sure if there are modifications we need to make on our side or if this issue lies more with railway?

Awaiting User Response

12 Replies

Railway
BOT

15 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


15 days ago

Hey there Mark,

Unfortunately this is a known issue, we're trying to investigate the root cause of this regression. Do you have some logs or traces when the spikes occurred with the slow reads/writes?


Status changed to Awaiting User Response Railway 15 days ago


molhar
PRO

15 days ago

Hi Angelo, I can see the spike in API latency in Sentry. It's hard to get Sentry to label the graph nicely, those previous spikes are back on July 14th, then July 9th.
There doesn't seem to be a correlation with server activitiy. The site isn't especially busy today, we're not curently running anything like billing runs etc.

Is it possible to revert back to GCP till the issue is better understood? It's really hurting performance.

Attachments


Status changed to Awaiting Railway Response Railway 15 days ago


15 days ago

That was the next thing I was going to suggest, I have enabled the ability to migrate back for your account. You should see a dropdown with options that say: "Legacy"


Status changed to Awaiting User Response Railway 15 days ago


molhar
PRO

15 days ago

Thanks, currently though I see two different EU Wests but no legacy label? I've tried refreshing the dashboard.

Attachments


Status changed to Awaiting Railway Response Railway 15 days ago


molhar
PRO

15 days ago

I don't see anything in account settings.


molhar
PRO

14 days ago

Hi Angelo, any update on this? Whilst our API/postgres latency has settled for now, we would still like to move to GCP until the underlying issue can be identified. Obviously happy to help with any investigation.


14 days ago

Jeez, that must be frustrating. We merged a PR that removed the labels, going to ping the team.


Status changed to Awaiting User Response Railway 14 days ago


iruffeyi
PRO

11 days ago

Hi Angelo, before I open another thread, I'll write here. We have been having the same problems for some time. Very simple queries often take 3-5 seconds and sometimes up to 12 seconds. I first thought it was due to our application, but I run simple UPDATE methods directly on the database and these also take 3-5 seconds. I have the feeling that this is the case since we switched to Metal. Though I have a feeling it's only in the prod environment. Is there anything we/you can change or do I need to create a separate thread for this?


Status changed to Awaiting Railway Response Railway 11 days ago


iruffeyi

Hi Angelo, before I open another thread, I'll write here. We have been having the same problems for some time. Very simple queries often take 3-5 seconds and sometimes up to 12 seconds. I first thought it was due to our application, but I run simple UPDATE methods directly on the database and these also take 3-5 seconds. I have the feeling that this is the case since we switched to Metal. Though I have a feeling it's only in the prod environment. Is there anything we/you can change or do I need to create a separate thread for this?

11 days ago

Heya, we'll need you to make a separate thread


Status changed to Awaiting User Response Railway 11 days ago


itsrems

Heya, we'll need you to make a separate thread

iruffeyi
PRO

11 days ago


Status changed to Awaiting Railway Response Railway 11 days ago


Status changed to Awaiting User Response itsrems 11 days ago


Railway
BOT

5 days ago

🛠️ The ticket Performance issue with disk operations on metal has been marked as todo.


Slow postgres queries - Railway Help Station