Failed to start a background worker error, TimescaleDB

In brief:

Logs show errors including the phrase Failed to start a background worker.

TimescaleDB version: Multiple releases
PostgreSQL version: Multiple releases
Platform: Cross-platform, cloud and self-hosted environments

Compression may be failing and there will be variations of this warning message. For example:

  • "Compression Policy [n]": failed to start a background worker
  • "Telemetry Reporter [n]": failed to start a background worker

This issue often arises when worker settings are not properly set. There are three key settings: max_worker_processes , max_parallel_workers , and timescaledb.max_background_workers

These should be set according to these rules of thumb:

timescaledb.max_background_workers = number of databases + number of concurrent background workers

max_worker_processes = timescaledb.max_background_workers + max_parallel_workers

Read more about this topic.