Why do such errors occur?
gromir55
FREEOP

2 months ago

Why do these errors happen? I'm constantly getting proxy errors and bot issues.

Solved$10 Bounty

Pinned Solution

ilyassbreth
FREE

2 months ago

this is railway's zero-downtime deploy keeps your old bot running while starting the new one, so you have 2 instances both trying to poll telegram at the same time. telegram only allows one instance to call getupdates so it kills the connection

quick fix is to add this environment variable in your service settings:

RAILWAY_DEPLOYMENT_OVERLAP_SECONDS=0

this tells railway to kill the old deployment immediately instead of waiting 20 seconds. should stop the conflict errors right away

also make sure replicas is set to 1 in your service settings under deploy section

if you're still getting proxy timeouts after this, there's a separate railway networking issue with telegram's ips that some people are working around with cloudflare workers as a proxy, but try the overlap fix first since that's your main problem

2 Replies

ilyassbreth
FREE

2 months ago

this is railway's zero-downtime deploy keeps your old bot running while starting the new one, so you have 2 instances both trying to poll telegram at the same time. telegram only allows one instance to call getupdates so it kills the connection

quick fix is to add this environment variable in your service settings:

RAILWAY_DEPLOYMENT_OVERLAP_SECONDS=0

this tells railway to kill the old deployment immediately instead of waiting 20 seconds. should stop the conflict errors right away

also make sure replicas is set to 1 in your service settings under deploy section

if you're still getting proxy timeouts after this, there's a separate railway networking issue with telegram's ips that some people are working around with cloudflare workers as a proxy, but try the overlap fix first since that's your main problem


ilyassbreth
FREE

2 months ago

it work as expected


Status changed to Solved brody about 2 months ago


Loading...