From cda1bec3e0017fb3403cf895f863c4c53932e761 Mon Sep 17 00:00:00 2001 From: zeroheure Date: Thu, 18 Jan 2018 00:29:14 +0100 Subject: [PATCH] [DOC] cmdline: proper default for limit-memory The default values for --limit-memory-(soft|hard) had been changed in Odoo v8.0, but this change wasn't reflected in the cmdline --help. Closes #22315 --- doc/reference/cmdline.rst | 4 ++-- odoo/tools/config.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/reference/cmdline.rst b/doc/reference/cmdline.rst index 21f5b80ba6d..fa57319e4f9 100644 --- a/doc/reference/cmdline.rst +++ b/doc/reference/cmdline.rst @@ -54,7 +54,7 @@ Running the server Maximum allowed virtual memory per worker. If the limit is exceeded, the worker is killed and recycled at the end of the current request. - Defaults to 2048MB. + Defaults to 2048MiB. .. option:: --limit-memory-hard @@ -62,7 +62,7 @@ Running the server immediately killed without waiting for the end of the current request processing. - Defaults to 2560MB. + Defaults to 2560MiB. .. option:: --limit-time-cpu diff --git a/odoo/tools/config.py b/odoo/tools/config.py index 2bf198cc585..475f959a025 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -266,10 +266,12 @@ class configmanager(object): help="Specify the number of workers, 0 disable prefork mode.", type="int") group.add_option("--limit-memory-soft", dest="limit_memory_soft", my_default=2048 * 1024 * 1024, - help="Maximum allowed virtual memory per worker, when reached the worker be reset after the current request (default 671088640 aka 640MB).", + help="Maximum allowed virtual memory per worker, when reached the worker be " + "reset after the current request (default 2048MiB).", type="int") group.add_option("--limit-memory-hard", dest="limit_memory_hard", my_default=2560 * 1024 * 1024, - help="Maximum allowed virtual memory per worker, when reached, any memory allocation will fail (default 805306368 aka 768MB).", + help="Maximum allowed virtual memory per worker, when reached, any memory " + "allocation will fail (default 2560MiB).", type="int") group.add_option("--limit-time-cpu", dest="limit_time_cpu", my_default=60, help="Maximum allowed CPU time per request (default 60).",