From aa8de3d4d2609f2bac093bb7b485a9fd8481e18a Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 14 Dec 2022 09:24:16 +0000 Subject: [PATCH] [IMP] config: increase limit request A typical Odoo worker is able to handle ~20 requests per second. With a default limit to 8192, it means that the worker is recycled after 8192 / 20 = 409s ~ 7 minutes. There is no reason to recycle a worker that often, since there are other means of limiting the resources allocated to a worker such as the memory limit. We increase the default limit request to 65536, therefore the lifetime of a worker should be extended to ~1 hour in peak times. closes odoo/odoo#107970 X-original-commit: a24d32003af334d63f04d6892dbc2e4383a65301 Signed-off-by: Nicolas Martinelli (nim) --- odoo/tools/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/tools/config.py b/odoo/tools/config.py index bbc26fc28b4..b7ddf5e8927 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -340,8 +340,8 @@ class configmanager(object): help="Maximum allowed Real time per cron job. (default: --limit-time-real). " "Set to 0 for no limit. ", type="int") - group.add_option("--limit-request", dest="limit_request", my_default=8192, - help="Maximum number of request to be processed per worker (default 8192).", + group.add_option("--limit-request", dest="limit_request", my_default=2**16, + help="Maximum number of request to be processed per worker (default 65536).", type="int") parser.add_option_group(group)