Sudden rising deployment costs.

I'm on the Hobby plan and I have a couple of deployments for showing employers my recent bootcamp projects (very small projects at that). I received an email a few days ago saying the cost on one of these deployments is already at $2.50 over 3 days (Feb 29 - Mar 2). Today it's at $4.20 and rising. I've had these deployments for months and hardly ever used 1 GB. When comparing my two deployments, one has zero Egress usage, while the other has 42 GB? What is Egress? Why is this happening all of a sudden? How do I fix it? I looked at my deployments awhile ago when the migrate deployments notices went out, but everything seemed to be in order. Perhaps it wasn't. Would this have something to do with the rising cost? Help?
18 Replies
Percy
Percy8mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Brody
Brody8mo ago
railway charges for egress, egress is the outgoing network traffic
Percy
Percy8mo ago
No project ID was provided. Closing thread.
Adam Kowalczuk
Adam Kowalczuk8mo ago
e74d4599-d384-4005-ad2f-fd9ca6a3176c Ok but why all of a sudden rise in outgoing network traffic? What does that mean in this case? It's a simple single page scheduling app that I'm assuming no one is using. But I can see the Egress using climb on the usage page. Is there someway to slow this down?
Brody
Brody8mo ago
put cloudflare in front to block undesired traffic
Adam Kowalczuk
Adam Kowalczuk8mo ago
you got a tutorial to link me to?
ThallesComH
ThallesComH8mo ago
also, if you have a database make sure to use private networking
Brody
Brody8mo ago
good call!
Adam Kowalczuk
Adam Kowalczuk8mo ago
ok I've found that in the database settings, is that the address I'm not using the communication with the deployed server? how would I go about that?
ThallesComH
ThallesComH8mo ago
what are u using, nodejs?
Brody
Brody8mo ago
use the private url variable to connect to the database
Adam Kowalczuk
Adam Kowalczuk8mo ago
Yes nodejs.
ThallesComH
ThallesComH8mo ago
change your database url to use the private one and in your start script add the following:
"start": "sleep 10 && <your start command"
"start": "sleep 10 && <your start command"
sleep 10 is a little overkill, try to reduce if it bothers you a 10 second delay to start your application we need sleep because private networking takes some time to initialize
Adam Kowalczuk
Adam Kowalczuk8mo ago
this sleep 10 will be added in the package.json of the frontend or backend of the project? I'm guessing backend since that's what's deployed on Railway?
ThallesComH
ThallesComH8mo ago
yeah, if your backend is the one that connects to a database
Adam Kowalczuk
Adam Kowalczuk8mo ago
ok this worked, thank you so much for your help! for these small hobby projects, would you recommend using this method going forward?
Want results from more Discord servers?
Add your server