Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions odoo/service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,10 @@ def run(self):
_logger.info("Worker (%s) exiting. request_count: %s, registry count: %s.",
self.pid, self.request_count,
len(odoo.modules.registry.Registry.registries))
if self.request_count == 0:
# Worker has exceeded memory limit without processing any requests
# raise an exception to force it to exit and clear memory
raise Exception("Worker (%s) exited without processing any requests" % self.pid)
self.stop()
except Exception:
_logger.exception("Worker (%s) Exception occured, exiting..." % self.pid)
Expand Down