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
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.railway charges for egress, egress is the outgoing network traffic
No project ID was provided. Closing thread.
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?
put cloudflare in front to block undesired traffic
you got a tutorial to link me to?
also, if you have a database make sure to use private networking
good call!
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?
what are u using, nodejs?
use the private url variable to connect to the database
Yes nodejs.
change your database url to use the private one
and in your start script add the following:
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
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?
yeah, if your backend is the one that connects to a database
ok this worked, thank you so much for your help! for these small hobby projects, would you recommend using this method going forward?