Commit 423341c8 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5: Make ZODB pool-size default to thread_amount.

Avoids being spammed with
  WARNING ZODB.DB DB.open() has X open connections with a pool_size of 7
on zopes with more than 7 worker threads.
Also, allows better hit-rate on volatile attributes in such case, as
otherwise connections (and their cache) would be discarded when many
threads would be made busy, decreasing performance.
parent 295625a6
...@@ -341,7 +341,7 @@ md5sum = b0cb0ee97cddc79112a718e065806037 ...@@ -341,7 +341,7 @@ md5sum = b0cb0ee97cddc79112a718e065806037
[template-zope] [template-zope]
<= download-base <= download-base
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 144fb4567e12bac2c7ed61e7477d5418 md5sum = 83304f1940e0d7555bd678e2cea4c738
link-binary = link-binary =
${aspell:location}/bin/aspell ${aspell:location}/bin/aspell
${dmtx-utils:location}/bin/dmtxwrite ${dmtx-utils:location}/bin/dmtxwrite
......
...@@ -284,6 +284,7 @@ node-id = {{ dumps(node_id_base ~ '-' ~ index) }} ...@@ -284,6 +284,7 @@ node-id = {{ dumps(node_id_base ~ '-' ~ index) }}
{% set log_list = [] -%} {% set log_list = [] -%}
{% set import_set = set() -%} {% set import_set = set() -%}
{% for db_name, zodb in zodb_dict.iteritems() -%} {% for db_name, zodb in zodb_dict.iteritems() -%}
{% do zodb.setdefault('pool-size', thread_amount) -%}
{% if zodb['type'] == 'neo' -%} {% if zodb['type'] == 'neo' -%}
{% do import_set.add('neo.client') -%} {% do import_set.add('neo.client') -%}
{% set log = name ~ '-neo-' ~ db_name ~ '.log' -%} {% set log = name ~ '-neo-' ~ db_name ~ '.log' -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment