2 months ago
Why do these errors happen? I'm constantly getting proxy errors and bot issues.
Pinned Solution
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=0this 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
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=0this 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 months ago
it work as expected
Status changed to Solved brody • about 2 months ago
