Egress usage has sky-rocketed
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.
Solution:Jump to solution
are you connecting to it over the public network? if so, you should use the private network.
18 Replies
Project ID:
N/A
Solution
are you connecting to it over the public network? if so, you should use the private network.
The database and the web app are both in the same project on Railway
I'm just connecting to the db with the DATABASE_URL var
you are using the public network then, thus you are subjecting yourself to egress fees
connect to the database via the private network, there is no network costs for service to service communication over the private network
this one: DATABASE_PRIVATE_URL?
correct
I tried using that var but it didn't work
please provide error messages
hang on, let me have another go
Just keep getting this:
django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not known
does your service in question have a volume?
yeah, it's got one
then you will need to prefix the start command with a 3 second sleep
python manage.py migrate && python manage.py collectstatic --no-input && gunicorn jobsite.wsgi
how can I change this?
Alright, that's got it working, thanks!
no problem!
I'll just have to keep an eye on the costs and see if they come back down now
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