Runtime v2
henjesus
HOBBYOP

2 years ago

Hello, my app is very slow after I switched to runtime v2. My app is Django <#846875565357006878>

Solved

44 Replies

henjesus
HOBBYOP

2 years ago

a0fdda8e-51c2-475b-a4be-dfc1f3374dc8


henjesus
HOBBYOP

2 years ago

I'm very worried


henjesus
HOBBYOP

2 years ago

After I made the change to runtime v2 the speed changed drastically, it only improved when I changed the region to us-west1 Oregon


henjesus
HOBBYOP

2 years ago

But now I can't change anymore


henjesus
HOBBYOP

2 years ago

Help please


henjesus
HOBBYOP

2 years ago

@Brody


henjesus
HOBBYOP

2 years ago

I can't change my django server to the us-west1 Oregon region again and this is causing a lot of slowness because I have a DB and a redis in this Oregon region and my django server in us-west2


2 years ago

you would want to be using the private network to connect to the database to avoid any latency issues


henjesus
HOBBYOP

2 years ago

yes, but how do I do it? I have PostgreSQL and redis


2 years ago

use the private network to connect to them


henjesus
HOBBYOP

2 years ago

I don't know how to do it



2 years ago

If you're ever unsure of how to do something, reference the docs


henjesus
HOBBYOP

2 years ago

I changed to private network but it's still slow


henjesus
HOBBYOP

2 years ago

Can't I change my django server to oregon again?


2 years ago

metal is the default for hobby now


2 years ago

it's slow likely because you are not using the private network


henjesus
HOBBYOP

2 years ago

I confirmed the change has improved, but it is slower compared to before


2 years ago

are you making a new database connection for every query?


henjesus
HOBBYOP

2 years ago

I'm using django, with default settings.


henjesus
HOBBYOP

2 years ago

With maximum connection time of 1800


2 years ago

I'm sorry but that doesn't answer the question


henjesus
HOBBYOP

2 years ago

I am not opening a new connection on every query, each connection is opened and held up to 600 seconds


grantbirki
HOBBY

2 years ago

metal is the default for hobby now

Kinda related...

Our deployments our failing (I just opened a public help issue as well). Our railway.json config file points to a non-metal region and since we keep getting put onto a default metal region it causes a conflict and we cannot get a passing deployment. Yikes...


2 years ago

All Hobby workloads have now been diverted to metal.


2 years ago

if you're connecting to the database via the private network then any slowness you are seeing would be due to inefficient code


maddsua
HOBBY

2 years ago

so does it mean that metal finally has volumes or not


henjesus
HOBBYOP

2 years ago

If I switch to the pro plan, will the amount I pay per month for my project increase, in addition to the change from $5 to $20?


2 years ago

nope


2 years ago

pro plan is not the solution here


henjesus
HOBBYOP

2 years ago

It's because before when everyone was in the same region the speed was much higher


2 years ago

the speed is still high as long as you connect via the private network


henjesus
HOBBYOP

2 years ago

Is there any change in the monthly cost besides the monthly fee of $5 to $20?

Could the django server's region be affecting its speed? Maybe due to overload or distance?


2 years ago

again, the speed decrease is likely because you are connecting to the database publicly


henjesus
HOBBYOP

2 years ago

Can changing databases to runtime v2 help at all?


2 years ago

no it has nothing to do with application performance


henjesus
HOBBYOP

2 years ago

My variables in railway are like this: DATABASE_URL="${{Postgres.DATABASE_PRIVATE_URL}}"

RAILWAY="True"

REDIS_URL="${{Redis.REDIS_PRIVATE_URL}}"


henjesus
HOBBYOP

2 years ago

I can't believe you're still using the public network


2 years ago

I don't know if you are using DATABASE_URL in code


henjesus
HOBBYOP

2 years ago

import dj_database_url

DATABASE_URL = os.getenv("DATABASE_URL")

DATABASES = {
    "default": dj_database_url.config(default=DATABASE_URL, conn_max_age=600),
}

2 years ago

^^


henjesus
HOBBYOP

2 years ago

I don't understand why it was fast before if there was no change in the code, just in the region and runtime


2 years ago

going to mark this as solved because the railway side of things is sorted, what's left to do is write more efficient code so your application is no longer slow


2 years ago

!s


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...