Project and Database not on the same region?
mojamollcgit
HOBBYOP

a year ago

It seems the database can't be changed to metal. but my project got changed to metal and I can't change it back to us west(Oregon, USA). which is causing my app to run extremely slow. I mean 26 secs for a db query.

Is there a solution for this. I am on the Hobby plan.

Solved

5 Replies

a year ago

Databases can't be set to metal because metal doesn't support volumes yet, and yea hobby deploys are exclusively metal based now

That delay shouldn't happen though, 26 seconds is a bit much.. are you connected under the private network?


mojamollcgit
HOBBYOP

a year ago

Thanks for the reply, I think so I can, send you data if you need it. I could use some help in setting up properly. I am a bit confused about that part.


a year ago

Sure, all you need to do is connect using the connection url specified in your DATABASE_URL variable in the database you're using. If you're using MySQL then it'll be the MYSQL_URL that you want to connect to. If you're connecting via that connection string then you should be connecting under the private network. (Or if you're building the connection string yourself using the service variables then it should be fine too)

Note: Optimally you'll want to use reference variables when configuring this


mojamollcgit
HOBBYOP

a year ago

I'll double check them. However I am also confused about when should I use the {{RAILWAY_PRIVATE_DOMAIN}} for ALLOWED_HOSTS. because if I use that I am not able to access my site using my domain name or the {{RAILWAY_PUBLIC_DOMAIN}}. Sorry for the basic questions. still learning.


a year ago

Why not just specify both RAILWAY_PRIVATE_DOMAIN and RAILWAY_PUBLIC_DOMAIN in ALLOWED_HOSTS?


Status changed to Solved dev about 1 year ago


Loading...