R
Railway2y ago
! SAM

Telegram Latency/speed Issues

Hey, I have deployed my python telegram bot on railway, I am seeing a little slow speed and latency than replit. almost twice slow. When I was hosting it on replit and I run any command the responses are almost instant and on railway the speed is slow (like 1-2 sec delays) I have the Team plan and the resources in it are much better than replit ones. But it is still slow.
22 Replies
Percy
Percy2y ago
Project ID: 92172087-ff52-487f-ba32-e31121cc31a6
!                            SAM
! SAMOP2y ago
92172087-ff52-487f-ba32-e31121cc31a6
Brody
Brody2y ago
what makes you think that you're on the teams plan?
!                            SAM
! SAMOP2y ago
wdym
!                            SAM
! SAMOP2y ago
Brody
Brody2y ago
usually you would also have a team badge, Percy is not having a good day lol
!                            SAM
! SAMOP2y ago
?teamId=6a4316aa-d6c5-45ab-9585-40bb115e285b
Brody
Brody2y ago
fixed
!                            SAM
! SAMOP2y ago
you can check using this
Brody
Brody2y ago
okay so how exactly are you measuring ping times
!                            SAM
! SAMOP2y ago
!                            SAM
! SAMOP2y ago
@Client.on_message(filters.command(["ping", "pong"], bot_prefix))
async def ping(client, message):
sm= time.time()
st = await message.reply("Wait...")
into = time.time() - sm
await st.edit(f"**Ping :** `{int(into * 1000)}` **MS**")
@Client.on_message(filters.command(["ping", "pong"], bot_prefix))
async def ping(client, message):
sm= time.time()
st = await message.reply("Wait...")
into = time.time() - sm
await st.edit(f"**Ping :** `{int(into * 1000)}` **MS**")
time it takes to process 1 line of code and other commands respond awfully slow
Brody
Brody2y ago
cool, will try to reproduce this
!                            SAM
! SAMOP2y ago
ping me when you have an update on this.
Brody
Brody2y ago
will do
Brody
Brody2y ago
@do_not_honor
Brody
Brody2y ago
your bot on railway has better times than mine lol telegrams api server is located in the UK, railaway's only region is Oregon USA, so these times make perfect sense. theres nothing that can be done about this until railway rolls out regions, soon ™️
!                            SAM
! SAMOP2y ago
wow yeah, optimized and asynchronous code ig it would be great when it happens
!                            SAM
! SAMOP2y ago
already in progress ?
!                            SAM
! SAMOP2y ago
hmm
Brody
Brody2y ago
as far as I know, when this comes out, EU will be the first region available, so stay tuned for that!
Want results from more Discord servers?
Add your server