Recent Executions Deleted Randomly

Hello n8n Community,

We’re running n8n in self-hosted mode via Docker Compose and have encountered a serious issue: recent executions are being deleted at random, which prevents me from troubleshooting failed workflows—even though I’ve set:

  • EXECUTIONS_DATA_HARD_DELETE_BUFFER=259200
  • N8N_EXECUTIONS_DATA_PRUNE=true
  • N8N_EXECUTIONS_DATA_MAX_AGE=180

in our Docker file.

Information on my n8n setup

  • n8n version: 1.85.4
  • Database: PostgreSQL
  • EXECUTIONS_PROCESS setting: default
  • Running via: Docker
  • OS: Ubuntu 24.04

Principal execution-related configs

  • EXECUTIONS_DATA_HARD_DELETE_BUFFER=259200
  • N8N_EXECUTIONS_DATA_PRUNE=true
  • N8N_EXECUTIONS_DATA_MAX_AGE=180

This issue is urgent for us—any advice on preventing executions from being deleted or ensuring they persist for debugging would be greatly appreciated. Thank you!