High usage of Ram in queue mode / no reset

Describe the problem/error/question

Running n8n, hosted, in queue mode, with a main / worker / webhook / redis / postgres services, I don’t see Ram usage to lower after usage.

In this example, after 11 pm, there was no activity. I ended up by restarting all services twice, at 1:30 pm to get back to the starting values.
Primary: 173 Mo
Worker: 106 Mo
Webhook: 98 Mo
Postgres: 34 Mo
Redis: 5 Mo (it never increase that much)

I have extensively tweak the .env of each service.

The .env of the Primary

DB_POSTGRESDB_DATABASE="${{postgres.PGDATABASE}}"
DB_POSTGRESDB_HOST="${{postgres.PGHOST}}"
DB_POSTGRESDB_PASSWORD="${{postgres.PGPASSWORD}}"
DB_POSTGRESDB_PORT="${{postgres.PGPORT}}"
DB_POSTGRESDB_USER="${{postgres.PGUSER}}"
DB_TYPE="postgresdb"
QUEUE_BULL_REDIS_HOST="${{Redis.REDISPROXYHOST}}"
QUEUE_BULL_REDIS_PASSWORD="${{Redis.REDIS_PASSWORD}}"
QUEUE_BULL_REDIS_PORT="${{Redis.REDISPROXYPORT}}"
QUEUE_BULL_REDIS_USERNAME="${{Redis.REDISUSER}}"
EXECUTIONS_MODE="queue"
N8N_USE_PYTHON_FUNCTIONS="true"
NODE_FUNCTION_ALLOW_BUILTIN="*"
NODE_FUNCTION_ALLOW_EXTERNAL="@grpc/grpc-js,@grpc/proto-loader,@huggingface/inference,@qdrant/js-client-rest,axios,body-parser,compression,crypto-js,dayjs,express-rate-limit,fast-xml-parser,js-yaml,jsonwebtoken,langsmith,lodash,node-fetch,openai,picomatch,validator,xlsx,xml2js"
N8N_LISTEN_ADDRESS="::"
N8N_LOG_LEVEL="info"
N8N_ENCRYPTION_KEY="xxx"
N8N_PROTOCOL="https"
N8N_PAYLOAD_SIZE_MAX="128"
N8N_FORMDATA_FILE_SIZE_MAX="512"
PORT="5678"
N8N_DISABLE_PRODUCTION_MAIN_PROCESS="true"
N8N_HOST="cells.deposium.vip"
N8N_EDITOR_BASE_URL="https://my.main.com"
N8N_WEBHOOK_TEST_URL="https://my.main.com"
WEBHOOK_URL="https://webhook-my.main.com"
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS="true"
EXECUTIONS_TIMEOUT="300"
EXECUTIONS_TIMEOUT_MAX="600"
EXECUTIONS_DATA_PRUNE="true"
EXECUTIONS_DATA_MAX_AGE="24"
EXECUTIONS_DATA_PRUNE_MAX_COUNT="30"
EXECUTIONS_DATA_SAVE_ON_ERROR="all"
EXECUTIONS_DATA_SAVE_ON_SUCCESS="none"
EXECUTIONS_DATA_SAVE_ON_PROGRESS="false"
EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS="true"
EXECUTIONS_DATA_HARD_DELETE_BUFFER="0.3"
EXECUTIONS_DATA_PRUNE_HARD_DELETE_INTERVAL="20"
EXECUTIONS_DATA_PRUNE_SOFT_DELETE_INTERVAL="30"
N8N_CONCURRENCY_PRODUCTION_LIMIT="10"
N8N_SECURE_COOKIE="true"
N8N_BLOCK_ENV_ACCESS_IN_NODE="false"
N8N_REINSTALL_MISSING_PACKAGES="true"

I can share other .env, if needed, but they are more or less the same.

Any clue to optimize the Ram usage while not used except restarting all services ?

Thanks !

Information on your n8n setup

  • n8n version: 1.68.1
  • Operating system: ?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system: