Skip to content

Commit 89f87d5

Browse files
authored
Merge pull request #141 from coopdevs/feature/control-memory-limits
Be able to configure memory limits trough config
2 parents b3a400c + 2c1b2f2 commit 89f87d5

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ odoo_role_list_db: false
8787
8888
* Odoo HTTP server settings
8989
90-
```
90+
```yml
9191
# Set this to 127.0.0.1 when Odoo runs behind a reverse proxy
9292
odoo_role_odoo_http_interface: 0.0.0.0
9393
# Set this to true when Odoo runs behind a reverse proxy
@@ -96,6 +96,18 @@ odoo_role_odoo_proxy_mode: false
9696
odoo_role_workers: 2
9797
```
9898
99+
* Odoo other server settings
100+
101+
```yml
102+
# Customize the Odoo timeouts
103+
odoo_role_limit_time_cpu: 60
104+
odoo_role_limit_time_real: 120
105+
106+
# Customize the Odoo memory limits
107+
odoo_role_limit_memory_hard: 2684354560
108+
odoo_role_limit_memory_soft: 2147483648
109+
```
110+
99111
* Core modules list to install/update
100112
101113
```yml

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ odoo_role_enable_dbfilter_from_header: false
8181
odoo_role_limit_time_cpu: 60
8282
odoo_role_limit_time_real: 120
8383

84+
# Customize the Odoo memory limits
85+
odoo_role_limit_memory_hard: 2684354560
86+
odoo_role_limit_memory_soft: 2147483648
87+
8488
# Force getting db name from leftmost subdomain (different inventories for each DB)
8589
odoo_role_force_leftmost_subdomain: false
8690

templates/odoo.conf.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ workers = {{ odoo_role_workers }}
5656
limit_time_cpu = {{ odoo_role_limit_time_cpu }}
5757
limit_time_real = {{ odoo_role_limit_time_real }}
5858

59+
; Customize the Odoo memory limits
60+
limit_memory_hard = {{ odoo_role_limit_memory_hard }}
61+
limit_memory_soft = {{ odoo_role_limit_memory_soft }}
62+
5963
{% if odoo_role_enable_queue_job and odoo_role_channels %}
6064
[queue_job]
6165
channels = {{ odoo_role_channels }}

0 commit comments

Comments
 (0)