Runtime v2
henjesus
HOBBYOP

a year ago

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

Solved

44 Replies

henjesus
HOBBYOP

a year ago

a0fdda8e-51c2-475b-a4be-dfc1f3374dc8


henjesus
HOBBYOP

a year ago

I'm very worried


henjesus
HOBBYOP

a year 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

a year ago

But now I can't change anymore


henjesus
HOBBYOP

a year ago

Help please


henjesus
HOBBYOP

a year ago

@Brody


henjesus
HOBBYOP

a year 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


a year ago

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


henjesus
HOBBYOP

a year ago

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


a year ago

use the private network to connect to them


henjesus
HOBBYOP

a year ago

I don't know how to do it



a year ago

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


henjesus
HOBBYOP

a year ago

I changed to private network but it's still slow


henjesus
HOBBYOP

a year ago

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


a year ago

metal is the default for hobby now


a year ago

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


henjesus
HOBBYOP

a year ago

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


a year ago

are you making a new database connection for every query?


henjesus
HOBBYOP

a year ago

I'm using django, with default settings.


henjesus
HOBBYOP

a year ago

With maximum connection time of 1800


a year ago

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


henjesus
HOBBYOP

a year ago

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


grantbirki
HOBBY

a year 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...


a year ago

All Hobby workloads have now been diverted to metal.


a year 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

a year ago

so does it mean that metal finally has volumes or not


henjesus
HOBBYOP

a year 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?


a year ago

nope


a year ago

pro plan is not the solution here


henjesus
HOBBYOP

a year ago

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


a year ago

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


henjesus
HOBBYOP

a year 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?


a year ago

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


henjesus
HOBBYOP

a year ago

Can changing databases to runtime v2 help at all?


a year ago

no it has nothing to do with application performance


henjesus
HOBBYOP

a year ago

My variables in railway are like this: DATABASEURL="${{Postgres.DATABASEPRIVATEURL}}" RAILWAY="True" REDISURL="${{Redis.REDISPRIVATEURL}}"


henjesus
HOBBYOP

a year ago

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


a year ago

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


henjesus
HOBBYOP

a year ago

import djdatabaseurl

DATABASE_URL = os.getenv("DATABASE_URL")

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

a year ago

^^


henjesus
HOBBYOP

a year ago

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


a year 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


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...