FIX access database failed 99/28399/2
authorliyuenan <liyuenan@huawei.com>
Fri, 10 Feb 2017 01:37:26 +0000 (09:37 +0800)
committerJustin chi <chigang@huawei.com>
Mon, 13 Feb 2017 08:19:21 +0000 (08:19 +0000)
JIRA: COMPASS-521

Nova compute use osapi_compute and metadata api. Both of their worker
processes should be limited, otherwise mysql would not deal with those
processes.

Change-Id: Ib00b4731369c1c677639c9437ab83887550db572
Signed-off-by: liyuenan <liyuenan@huawei.com>
deploy/adapters/ansible/openstack/templates/nova.conf
deploy/adapters/ansible/roles/database/templates/my.cnf

index 99071d7..b648b03 100644 (file)
@@ -39,8 +39,9 @@ notification_driver = nova.openstack.common.notifier.rpc_notifier
 notification_driver = ceilometer.compute.nova_notifier
 memcached_servers = {{ memcached_servers }}
 
-{% if ansible_processor_vcpus > 30 %}
-osapi_compute_workers = 30
+{% if ansible_processor_vcpus > 20 %}
+osapi_compute_workers = 20
+metadata_workers = 20
 {% endif %}
 
 [database]
index f1170ec..1ed9b93 100644 (file)
@@ -29,7 +29,7 @@ tmp-table-size = 32M
 max-heap-table-size = 32M
 query-cache-type = 0
 query-cache-size = 0M
-thread-cache-size = 50
+thread-cache-size = {{ ansible_processor_vcpus * 10 }}
 open-files-limit = 65535
 table-definition-cache = 4096
 table-open-cache = 10240