Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Celery Workers Spawn Zombie Tasks on Hard Termination: The Mechanics of Timeout Propagation

Why Celery Workers Spawn Zombie Tasks on Hard Termination: The Mechanics of Timeout Propagation Graceful shutdowns in distributed task execution engines like Celery are notoriously deceptive. On paper, orchestration platforms like Kubernetes dispatch a SIGTERM to the container, the event loop captures the POSIX signal, triggers a cancellation cascade, runs resource cleanup routines, and exits…

Celery workers often leave behind incomplete tasks when abruptly stopped, leading to potential system issues. This phenomenon is primarily triggered by the premature termination of asynchronous processes, which fail to clean up resources properly. In a comprehensive investigation, an asynchronous simulation was constructed to replicate the behavior of Celery workers under termination conditions.

The simulation employed modern Python libraries such as asyncio, Pydantic v2 for type validation, and orjson for efficient state dumping. The expected workflow involved receiving a SIGTERM signal from Kubernetes, initiating a cancellation process, executing cleanup routines, and terminating gracefully with an exit code of 0. However, real-world scenarios frequently deviate from this ideal scenario, resulting in incomplete task executions.

These unfinished tasks leave behind uncommitted transactions, open connections, and potential deadlocks, creating "zombie" tasks that can cause further complications in the system.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Codex MCP: add, configure and debug MCP servers in Codex CLI

Originally published on vibeide.dev Codex can call tools from Model Context Protocol (MCP) servers: documentation lookups, browsers, design files, issue trackers and more.

  • Codex MCP enables CLI access to MCP server tools
  • Use codex mcp add to add server with name and URL/command
  • MCP servers managed via codex mcp configuration commands

Your Discord bot's timestamp says the year 58970 (I tested 16 edge cases)

Discord turns <t:1798765200:F> into a date shown in each reader's own time zone. The format is documented, but what Discord does with bad input isn't.

  • Discord bot timestamps can display years far in the future due to a bug.
  • Bug occurs with malformed or extreme codes, not with valid inputs.
  • Zero and negative values show dates from December 31, 1969.

More from Thursday 5 November →