Kilo
Anonymous
HOBBYOP

5 months ago

Hi,

For the past three weeks or so the response of my application has been very SLOW.
CRUD operations typically take 11 - 12 seconds.

I noticed a few weeks ago Railway initiated an automatic upgrade to Railway "Metal".

Is this upgrade the source of the slow response and how can I resolve?

thanks,
Kel

49 Replies

Anonymous
HOBBYOP

5 months ago

Project ID: da285e3a-b7b2-4c5a-a383-0e7f536ba2ac


medim
MODERATOR

5 months ago

Railway Metal is Railway's own underlying infrastructure! It is supposed to be faster and more reliable than the old GCP instances.
Could u maybe show us those requests in your HTTP logs?


medim
MODERATOR

5 months ago

Can you also make sure that all your services are in the same region and using the Private Network whenever possible?


Anonymous
HOBBYOP

5 months ago

How do I download the requests in my HTTP logs. I seemed to remember there is some kind of Railway widget that I have to install (?) in Chrome


Anonymous
HOBBYOP

5 months ago

Looks like it's running on the public network, how do I change to private network


Anonymous
HOBBYOP

5 months ago

1397349837602820400


Anonymous
HOBBYOP

5 months ago

both the app and database are both in the region US West (California)


medim
MODERATOR

5 months ago

Can you try clicking on that purple thunder icon? That will enable the metal edge network


medim
MODERATOR

5 months ago

And let's see if that speed things up for you


medim
MODERATOR

5 months ago

When I said private networking I'm talking about the communication between your services (see the docs I linked) and not your public domains!


Anonymous
HOBBYOP

5 months ago

Where exactly is this purple thunder icon?


Anonymous
HOBBYOP

5 months ago

here's a screen shot from http log showing opening a record is taking 12s


Anonymous
HOBBYOP

5 months ago

1397354161569530000


Anonymous
HOBBYOP

5 months ago

are these the purple thunder icons that I need to click?


Anonymous
HOBBYOP

5 months ago

1397355318219903000


medim
MODERATOR

5 months ago

yeah


Anonymous
HOBBYOP

5 months ago

it's now showing Metal Edge, but CRUD operations are still slow


Anonymous
HOBBYOP

5 months ago

1397359831299395600


medim
MODERATOR

5 months ago

According to your logs, seems that it is this /idea/ endpoint that is slower than the others, what does it do?


Anonymous
HOBBYOP

5 months ago

/idea/ is showing a list of 81 records in my database. My database is a postgres database hosted on Railway also


Anonymous
HOBBYOP

5 months ago

1397361474950922200


brody
EMPLOYEE

5 months ago

They are not connecting to their database via the private network.


Anonymous
HOBBYOP

5 months ago

How do I connect the database via the private network? Is it somewhere here…


Anonymous
HOBBYOP

5 months ago

1397364105689436200


medim
MODERATOR

5 months ago

No! go into your "web" service and reference the private db url in that env var of yours


medim
MODERATOR

5 months ago

Should be something like `


medim
MODERATOR

5 months ago

See that solid arrow between your services? it means you're referencing the public url, you need to change it to the private url.
Change it from ${{Postgres.DATABASE_PUBLIC_URL}} to ${{Postgres.DATABASE_URL}}


Anonymous
HOBBYOP

5 months ago

I'm looking at the 22 service variables for the web service, but I do not see a variable for "private db url". I see a variable called DATABASE_URL, is this what you are referring to ?


Anonymous
HOBBYOP

5 months ago

1397375825182986500


Anonymous
HOBBYOP

5 months ago

I'm not clear on what I'm supposed to change? Do I open the DATAURL variable, and change it to : ${{Postgres.DATABASEURL}}

Or do I create a new variable reference called DATATBASEPRIVATEURL and assign ${{Postgres.DATABASE_URL}}to it?


medim
MODERATOR

5 months ago

Change the DATABASE_URL to ${{Postgres.DATABASE_URL}}


medim
MODERATOR

5 months ago

considering that's the env var you use to connect to the db


Anonymous
HOBBYOP

5 months ago

When I go to edit the DATABASEURL variable it already shows ${{Postgres.DATABASEURL}} in the field

1397622602213757000


medim
MODERATOR

5 months ago

Then I don't think your app is using this DATABASE_URL env var
You also have a PGHOST,PGDATABASE, PGPASSWORD, PGPORT and PGUSER, your app is probably using these ones


Anonymous
HOBBYOP

5 months ago

What should be our next step to correct the issue?


Anonymous
HOBBYOP

5 months ago

Medim, Brody: any ideas on this issue?


brody
EMPLOYEE

5 months ago

have your application use the url based variable


Anonymous
HOBBYOP

5 months ago

OK how do I that Brody


brody
EMPLOYEE

5 months ago

I'm sorry but I cannot offer coding support, I'll let medim chime in on that.


Anonymous
HOBBYOP

5 months ago

Brody, can I just rollback the automatic upgrade to Railway "Metal" that was done. Everything was going fine until this automatic upgrade was done. Can I rollback?


brody
EMPLOYEE

5 months ago

We have deprecated the old regions, so you cannot roll back to them. Going forward, you will want a proper configuration for connecting to your database via the private network.


Anonymous
HOBBYOP

5 months ago

Hmm, so how do I create a proper configuration for connecting to my database via the private network?


brody
EMPLOYEE

5 months ago

I've done it for you, you can check the activy panel to see what i changed.

But now you need to update your source repo because it doesn't exist anymore.


medim
MODERATOR

5 months ago

By checking your code!


medim
MODERATOR

5 months ago

If it's a public repo I can check it for you


medim
MODERATOR

5 months ago

otherwise it's something only you can do


brody
EMPLOYEE

5 months ago

I already did it for them


Anonymous
HOBBYOP

5 months ago

Brody, thank you.


brody
EMPLOYEE

5 months ago

You need to update your source repo because it doesn't exist anymore.


Loading...