8 months ago
I've moved my discord.py bot from Heroku which has <1m20s deploy times and unmoving ping at 17-18ms, over to Railway which I think is far better but there's the issue of 3-8m deploy times and ping of 78ms, this is perfectly fine, but it ramps up to 400-800ms when performing a task like downloading an image. I was wondering if there was any way to fix the deploy times and if I could get an answer as to why the ping is so terrible (the ping is equal to home wireless internet).
49 Replies
8 months ago
Discord's gateway/api is in US East, so you need to deploy to Railway's US East region if you want optimal latency to Discord.
alright I'll try that out thanks <3
I thought it was in san francisco so I put us west
8 months ago
side bar, your home wireless ping is 400-800ms?
no my home has fiber so my ping is on average 19ms, but when I used to have wireless and running my bot on my pc the ping would average 100ms with spikes to 400-800ms just like what's happening with railway
right now my bot's ping is 74ms on us-west, once railway deploys to the east I'll see what the ping is
8 months ago
Gotcha, as for the longer build times, I would recommend trying to switch to Railpack in your service settings.
8 months ago
nice!
8 months ago
Let me know if Railpack improves anything!
ofc, I've done lots of reading on the differences and railpack looked like it'd easily speed up the install so will be excited to move over to it <3
8 months ago
Thats part of the main goal of Railpack, faster builds!
and ty for all your contributions to help people, all the issues online you were responding and you helped me understand railway more <:DBCatSob:1141525564960817202>
8 months ago
Thank you for the kind words ❤️
it improved it to 2m40s but on nixpacks it was 3m10s - 3m50s on average, it's a good improvement but still far worse than heroku which I'm sad about
it's the only really bad thing about railway so far but all the good stuff about railway outweighs it by an incredible amount
the time to beat with heroku was 1m20s absolute max deploy time so still need 50% to be on par
I'm gonna see about improving my requirements.txt to have far less installs to see if I can get close to heroku in deploy time
8 months ago
If you really want to slim down your build times, go for a Dockerfile.
8 months ago
Good time to start learning!
without improving requirements.txt but using a dockerfile I managed to get it down to 1m5s
8 months ago
Hell yeah
there is now only upsides to going with railway over heroku <:sunglasses:774160262789595176>
the only annoying thing is I had to add , flush=True to every print statement because adding -u to my python main.py statement didn't actually work for having it unbuffered
8 months ago
You could also set PYTHONUNBUFFERED=1 in your Dockerfile.
8 months ago
Interesting, I've never been told that it hasn't worked
8 months ago
Perhaps you have a reproducible example?
yeah I tried it and looked online everywhere to see if anyone had another solution to it so I wouldn't have to add flush to every print statement but no one had an answer, I'm on python:3.10.12-slim-buster
8 months ago
Can you share how you added it to your Dockerfile?
I added ENV PYTHONUNBUFFERED=1 after FROM python:3.10.12-slim-buster at the top of the Dockerfile file
8 months ago
Sounds correct to me, very odd
it's all good though since luckily you can add flush to your print statements or create a new custom print function which automatically applies flush for you
8 months ago
Glad you got it solved!
is there any way to add people on github or email as an admin to a project?
8 months ago
No, if you want them as an admin, they would need to be added as an admin to the workspace, not just to a project.
hm ok, would that mean they have access to all my projects? <:think:768489102680915979>
8 months ago
Yes
that's a bummer, I want to have someone as an admin to 1 project but not any others
8 months ago
The most you can do at the project level is be a member.
8 months ago
Just add them as a member to your project, you can do that from within the project settings
I managed to invite them to a project and it's working as I'd had hoped it would
8 months ago
Awesome! They just can't do destructive actions.
8 months ago
!s
Status changed to Solved brody • 8 months ago
