Egress usage has sky-rocketed
nick12
HOBBYOP

a year ago

I deleted my postgress database a week ago and reinstalled it only to find yesterday that the egress usage had gone from almost nothing to $18.

I have since deleted the database and reinstalled it again and now it's gone down to around a third of that. Any idea how to get it back to almost nothing again? I have no idea what has caused it to jump.

22 Replies

brody
EMPLOYEE

a year ago

are you connecting to it over the public network?


nick12
HOBBYOP

a year ago

The database and the web app are both in the same project on Railway


nick12
HOBBYOP

a year ago

I'm just connecting to the db with the DATABASE_URL var


brody
EMPLOYEE

a year ago

you are using the public network then, thus you are subjecting yourself to egress fees


brody
EMPLOYEE

a year ago

connect to the database via the private network, there is no network costs for service to service communication over the private network


nick12
HOBBYOP

a year ago

this one: DATABASEPRIVATEURL?


brody
EMPLOYEE

a year ago

correct


nick12
HOBBYOP

a year ago

I tried using that var but it didn't work


brody
EMPLOYEE

a year ago

please provide error messages


nick12
HOBBYOP

a year ago

hang on, let me have another go


nick12
HOBBYOP

a year ago

Just keep getting this:


nick12
HOBBYOP

a year ago

django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not known


brody
EMPLOYEE

a year ago

does your service in question have a volume?


nick12
HOBBYOP

a year ago

yeah, it's got one


brody
EMPLOYEE

a year ago

then you will need to prefix the start command with a 3 second sleep


nick12
HOBBYOP

a year ago

python manage.py migrate && python manage.py collectstatic --no-input && gunicorn jobsite.wsgi


nick12
HOBBYOP

a year ago

how can I change this?


brody
EMPLOYEE

a year ago

sleep 3; python manage.py migrate && python manage.py collectstatic --no-input && gunicorn jobsite.wsgi


nick12
HOBBYOP

a year ago

Alright, that's got it working, thanks!


brody
EMPLOYEE

a year ago

no problem!


nick12
HOBBYOP

a year ago

I'll just have to keep an eye on the costs and see if they come back down now


brody
EMPLOYEE

a year ago

there is no network costs for service to service communication over the private network, so if your egress costs go up, it's something else


Loading...