Skip to content

Fix Odoo Registry Loaded Multiple Times Warning: Causes and Solutions

DeployMonkey Team · March 23, 2026 9 min read

The Registry Multiple Load Problem

You check your Odoo logs and see warnings about the registry being loaded multiple times, or your Odoo server takes an extremely long time to start. The registry is Odoo's core data structure — it holds all model definitions, fields, and views. Loading it once is normal; loading it repeatedly wastes CPU, memory, and time.

What the Warnings Look Like

INFO odoo.modules.loading: loading 1 modules...
INFO odoo.modules.loading: 1 modules loaded in 0.42s
INFO odoo.modules.registry: Registry loaded in 12.345s
INFO odoo.modules.loading: loading 1 modules...
INFO odoo.modules.loading: 1 modules loaded in 0.38s
INFO odoo.modules.registry: Registry loaded in 11.892s
# ... repeated 3-5 times

# Or explicitly:
WARNING odoo.modules.registry: Registry for database 'mydb' loaded multiple times

# Startup takes 2-5 minutes instead of 30 seconds

What the Registry Is

The Odoo registry is an in-memory representation of all installed modules. It contains:

  • All model classes with their fields and methods
  • All XML views, actions, and menus
  • Security rules and access control lists
  • Pre-computed field dependencies

Loading the registry means reading all this from the database and Python code, building the class hierarchy, and validating everything. For a database with 100+ modules, this takes 10-30 seconds.

Cause 1: Multiple Databases in db_name

If db_name in odoo.conf lists multiple databases, Odoo may pre-load registries for all of them.

# BAD — loads registry for each database
db_name = db1,db2,db3

# FIX — specify only the database(s) you need
db_name = production_db

# Or leave empty and set db_filter to limit access
db_name =
dbfilter = ^production_db$

Cause 2: Workers Restarting Due to Memory Limits

When workers exceed limit_memory_soft, they restart and reload the registry. If the limit is too low, this happens constantly.

# In odoo.conf:
# BAD — too low, causes constant worker restarts
limit_memory_soft = 268435456   # 256 MB

# FIX — set reasonable limits
limit_memory_soft = 2147483648  # 2 GB
limit_memory_hard = 2684354560  # 2.5 GB

# Check if workers are being killed:
grep -i 'worker.*kill\|worker.*memory' /var/log/odoo/odoo-server.log

Cause 3: Signal-Triggered Reloads

Sending SIGHUP to the Odoo master process triggers a registry reload. Some monitoring tools or init scripts do this unintentionally.

# Check if something is sending SIGHUP:
grep -i 'signal\|sighup\|reload' /var/log/odoo/odoo-server.log

# Common culprits:
# - logrotate with 'kill -HUP' in postrotate
# - systemd WatchdogSec too aggressive
# - monitoring tools (monit, supervisord) doing health checks

Cause 4: Module Update Loops

A module with a broken post_init_hook or init() method that triggers another module load can cause an infinite reload loop.

# Check for post_init_hook issues:
grep -r 'post_init_hook' /path/to/your/custom/modules/

# Common issue: post_init_hook calls env['ir.module.module'].upgrade_module()
# This triggers a full registry reload inside the load process

# Fix: Move one-time setup logic to a separate script or cron job
# instead of post_init_hook

Cause 5: Concurrent Database Access During Startup

If web requests hit Odoo while it is still loading, they can trigger additional registry loads.

# Fix: Use a startup delay in your load balancer
# nginx example — return 503 until Odoo is ready:
upstream odoo {
    server 127.0.0.1:8069 max_fails=3 fail_timeout=30s;
}

# Or use systemd ExecStartPost to wait:
[Service]
ExecStartPost=/bin/sleep 30

Cause 6: db_filter Matching Multiple Databases

If dbfilter matches multiple databases (or all of them), Odoo may load registries for databases it should not.

# BAD — matches everything
dbfilter = .*

# FIX — exact match for your database
dbfilter = ^production_db$

# With hostname-based filtering:
dbfilter = ^%h$

Performance Impact

Each registry load is expensive:

Database SizeModulesRegistry Load TimeMemory per Load
Small20-305-10 seconds200 MB
Medium50-8015-25 seconds500 MB
Large100-15030-60 seconds800+ MB

If the registry loads 5 times at startup, a medium installation wastes 2 minutes and 2.5 GB of memory.

Diagnosing Registry Issues

# 1. Count registry loads in logs:
grep -c 'Registry loaded' /var/log/odoo/odoo-server.log

# 2. Check timing of loads:
grep 'Registry loaded' /var/log/odoo/odoo-server.log

# 3. Monitor worker restarts:
grep -E 'Worker|Spawning|killed' /var/log/odoo/odoo-server.log | tail -20

# 4. Check database list:
psql -U odoo -c "SELECT datname FROM pg_database WHERE datistemplate = false;"

# 5. Verify odoo.conf settings:
grep -E '^(db_name|dbfilter|workers|limit_memory)' /etc/odoo/odoo.conf

Prevention

  • Always set dbfilter to match exactly one database in production
  • Set memory limits high enough to avoid constant worker restarts
  • Do not send SIGHUP to Odoo — use full restarts instead
  • Keep the number of installed modules reasonable — uninstall unused ones
  • Use a load balancer health check that waits for Odoo to be fully ready before sending traffic