Kilo
Anonymous
HOBBYOP

10 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

10 months ago

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


10 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?


10 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

10 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

10 months ago

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


Anonymous
HOBBYOP

10 months ago

1397349837602820307


Anonymous
HOBBYOP

10 months ago

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


10 months ago

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


10 months ago

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


10 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

10 months ago

Where exactly is this purple thunder icon?


Anonymous
HOBBYOP

10 months ago

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


Anonymous
HOBBYOP

10 months ago

1397354161569530048


Anonymous
HOBBYOP

10 months ago

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


Anonymous
HOBBYOP

10 months ago

1397355318219903037


10 months ago

yeah


Anonymous
HOBBYOP

10 months ago

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


Anonymous
HOBBYOP

10 months ago

1397359831299395584


10 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

10 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

10 months ago

1397361474950922331


10 months ago

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


Anonymous
HOBBYOP

10 months ago

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


Anonymous
HOBBYOP

10 months ago

1397364105689436211


10 months ago

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


10 months ago

Should be something like `


10 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

10 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

10 months ago

1397375825182986431


Anonymous
HOBBYOP

10 months ago

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

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


10 months ago

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


10 months ago

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


Anonymous
HOBBYOP

10 months ago

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

1397622602213756988


10 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

10 months ago

What should be our next step to correct the issue?


Anonymous
HOBBYOP

10 months ago

Medim, Brody: any ideas on this issue?


10 months ago

have your application use the url based variable


Anonymous
HOBBYOP

10 months ago

OK how do I that Brody


10 months ago

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


Anonymous
HOBBYOP

10 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?


10 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

10 months ago

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


10 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.


10 months ago

By checking your code!


10 months ago

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


10 months ago

otherwise it's something only you can do


10 months ago

I already did it for them


Anonymous
HOBBYOP

10 months ago

Brody, thank you.


10 months ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...