Odoo 19 app

Redis Session Store

Redis Session Store for Odoo 19 - Shared Sessions for Multiple Servers

automated testslines in odoo.conf to switch oncode changes in Odoo30 sdefault retry after an outageWhat you need

What it does

Odoo keeps every login session in files on the local disk, so two Odoo servers behind a load balancer log users out each other. This module moves the sessions to Redis: every Odoo process reads the same sessions, they expire by themselves, and if Redis goes down Odoo keeps working on the filesystem.

The module replaces Odoo's session store with a Redis one. It is loaded as a server wide module, so it is active before any database is opened - the login page, the database selector and every request use Redis.

Sessions are stored as JSON under a key prefix you choose, with a time to live that is refreshed on every request, so idle sessions disappear by themselves. Odoo's own session rotation, logout, device revocation (log out of other devices) and the session garbage collector keep working.

If Redis cannot be reached, the module logs one warning, writes sessions to the filesystem and retries Redis after 30 seconds. When Redis is back, sessions written during the outage are moved to Redis the next time they are used. A button moves all existing disk sessions in one go, keeping their remaining lifetime.