Telegram Bot API · error code

Telegram error 409: Conflict: terminated by other getUpdates request

ConfigurationHTTP 409409 Conflict: getUpdates and webhooks

Last verified against Telegram Bot API reference

What Telegram returns
Conflict: terminated by other getUpdates request; make sure that only one bot instance is running

What error 409 means

Two (or more) processes are calling getUpdates with the same bot token at the same time. Telegram allows exactly one long-poll connection per token; when a second one arrives, the server terminates the first and returns this 409 to it. Each instance then reconnects and terminates the other, so both log a stream of 409s and each receives roughly half of the updates at random.

This is why the classic symptom is a bot that answers some messages and ignores others. The token is valid, the webhook is empty, and the code is fine. There are simply two of you. You can reproduce it in ten seconds: open two terminals, run the same polling bot in both, and watch both start logging this description.

Every major library surfaces it under its own name, which is why searches for the same problem look different per stack. python-telegram-bot raises telegram.error.Conflict (documented as "raised when a long poll or webhook conflicts with another one"). aiogram v3 raises aiogram.exceptions.TelegramConflictError. grammY throws a GrammyError with error_code: 409 and additionally logs a hint that the bot is running several times on long polling. Telegraf rejects with a TelegramError whose message is 409: Conflict: terminated by other getUpdates request, and node-telegram-bot-api emits a polling_error event with code ETELEGRAM. All of them are wrapping the identical response body shown below.

Common culprits are a local development process still polling the production token, a container platform that scaled the polling worker to two replicas, a rolling deploy that started the new process before the old one exited, and a supervisor (pm2, systemd, nodemon) restarting a crashed worker while the old one is still draining.

What it looks like

{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}

Why it happens

  • Two replicas or dynos of a polling bot running at once.
  • A developer's laptop still polling the production token while production also polls.
  • A rolling deploy with overlap between the old and new instances.
  • A zombie process left behind by nodemon, pm2, systemd or a watchdog restart.
  • A CI job or cron script that calls getUpdates with the production token.

How to fix Telegram error 409

  1. 1Run getWebhookInfo first to rule out the sibling error: if url is set, you have the webhook-active variant instead.
  2. 2List every process that could hold the token: local shells, CI runners, staging hosts, extra replicas, old deploys. Stop all but one.
  3. 3Scale the polling worker to exactly one instance, and configure deploys to stop the old process before starting the new one (no overlap).
  4. 4If you cannot find the second consumer, revoke the token with @BotFather's /revoke and deploy the new one; whatever was polling with the old token dies instantly with 401.
  5. 5If you need more than one instance for throughput or availability, switch to webhooks behind a load balancer; webhook delivery fans out to up to 100 connections.
  6. 6After fixing, confirm the 409s stop and getUpdates returns updates consistently for several minutes.

How to stop it recurring

Use separate bot tokens for development, staging and production so a forgotten local process can never collide with production; verify which environment a token belongs to with the Telegram bot token checker. Treat 'one poller per token' as an infrastructure invariant enforced by a leader lock or a single-replica deployment, or remove the constraint entirely by moving to webhooks. The full diagnostic walkthrough is cause 1 in Telegram bot not responding.

Official reference: Telegram Bot API reference. See all Telegram error codes or the Telegram limits and quotas.

Related codes

Error 409 - quick answers

What does Telegram error 409 mean?

Two (or more) processes are calling getUpdates with the same bot token at the same time. Telegram allows exactly one long-poll connection per token; when a second one arrives, the server terminates the first and returns this 409 to it. Each instance then reconnects and terminates the other, so both log a stream of 409s and each receives roughly half of the updates at random.

How do I fix Telegram error 409?

1. Run getWebhookInfo first to rule out the sibling error: if url is set, you have the webhook-active variant instead. 2. List every process that could hold the token: local shells, CI runners, staging hosts, extra replicas, old deploys. Stop all but one. 3. Scale the polling worker to exactly one instance, and configure deploys to stop the old process before starting the new one (no overlap). 4. If you cannot find the second consumer, revoke the token with @BotFather's…

Stop debugging Telegram by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.