deploy times and ping issues
yes-0001
PROOP

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).

Solved

49 Replies

yes-0001
PROOP

8 months ago

Project ID: 0e7e6b3d-8f2e-4081-aea0-3b91afe2377f


yes-0001
PROOP

8 months ago

ran during small image install, time: JST timezone

1397718745178312700


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.


yes-0001
PROOP

8 months ago

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?


yes-0001
PROOP

8 months ago

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


yes-0001
PROOP

8 months ago

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.


yes-0001
PROOP

8 months ago

alright thanks, I was gonna try that but haven't had the time to switch


yes-0001
PROOP

8 months ago

the ping is now 14ms tysm


8 months ago

nice!


8 months ago

Let me know if Railpack improves anything!


yes-0001
PROOP

8 months ago

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!


yes-0001
PROOP

8 months ago

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 ❤️


yes-0001
PROOP

8 months ago

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


yes-0001
PROOP

8 months ago

it's the only really bad thing about railway so far but all the good stuff about railway outweighs it by an incredible amount


yes-0001
PROOP

8 months ago

the time to beat with heroku was 1m20s absolute max deploy time so still need 50% to be on par


yes-0001
PROOP

8 months ago

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.


yes-0001
PROOP

8 months ago

idk how that stuff works


8 months ago

Good time to start learning!


yes-0001
PROOP

8 months ago

without improving requirements.txt but using a dockerfile I managed to get it down to 1m5s


8 months ago

Hell yeah


yes-0001
PROOP

8 months ago

there is now only upsides to going with railway over heroku <:sunglasses:774160262789595176>


yes-0001
PROOP

8 months ago

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.


yes-0001
PROOP

8 months ago

yeah I tried that too and it didn't work


8 months ago

Interesting, I've never been told that it hasn't worked


8 months ago

Perhaps you have a reproducible example?


yes-0001
PROOP

8 months ago

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?


yes-0001
PROOP

8 months ago

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


yes-0001
PROOP

8 months ago

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!


yes-0001
PROOP

8 months ago

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.


yes-0001
PROOP

8 months ago

hm ok, would that mean they have access to all my projects? <:think:768489102680915979>


8 months ago

Yes


yes-0001
PROOP

8 months ago

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.


yes-0001
PROOP

8 months ago

ah ok, is there any way I can do that?


8 months ago

Just add them as a member to your project, you can do that from within the project settings


yes-0001
PROOP

8 months ago

ah ok I see now ty <3


yes-0001
PROOP

8 months ago

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


Loading...