summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorFabien Meghazi <fme@odoo.com>2019-09-09 12:58:41 +0000
committerFabien Meghazi <fme@odoo.com>2019-12-23 18:56:09 +0000
commit543a3ad204232cc67ae9e099f43960b664e8de19 (patch)
tree12e73445366ff06c998d6cb76266ce6dd13500f3 /addons/web/static/src/js/views/basic/basic_controller.js
parent447b33a3c2727b50e71c14dd4a7ce32378fc6bf0 (diff)
[FIX] server: limit concurrent http threads
Before this commit nothing prevented high concurrency on a threaded http server to consume too much resources, ending up failing requests either because the OS is unable to spawn that many threads (`RuntimeError: can't start new thread`), either because the Odoo db connection pool is full (`PoolError: The Connection Pool Is Full`). This commit adds the ODOO_MAX_HTTP_THREADS environment variable which allows to limit the amount of concurrent socket connections accepted by a threaded server, implicitly limiting the amount of concurrent threads running for http requests handling. Note that if a value has been provided to ODOO_MAX_HTTP_THREADS that cannot be parsed as an integer, a value will be automatically set to half the db connection pool size (which defaults to 64). This dynamic value is chosen because while most requests will borrow only one cursor concurrently, there are some exceptions where some controllers might allocate two or more cursors. closes odoo/odoo#42327 X-original-commit: d42a951369ee87b50e834f73cd2af5cf031d43f7 Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions