647ff667e6
In services which use the Apache HTTP server to service HTTP requests, there exists a TimeOut directive [1] which defaults to 60 seconds. APIs which come under heavy load, such as Cinder, can sometimes exceed this which results in a HTTP 504 Gateway timeout, or similar. However, the request can still be serviced without error. For example, if Nova calls the Cinder API to detach a volume, and this operation takes longer than the shortest of the two timeouts, Nova will emit a stack trace with a 504 Gateway timeout. At some time later, the request to detach the volume will succeed. The Nova and Cinder DBs then become out-of-sync with each other, and frequently DB surgery is required. Although strictly this category of bugs should be fixed in OpenStack services, it is not realistic to expect this to happen in the short term. Therefore, this change makes it easier to set the Apache HTTP timeout via a new variable. An example of a related bug is here: https://bugs.launchpad.net/nova/+bug/1888665 Whilst this timeout can currently be set by overriding the WSGI config for individual services, this change makes it much easier. Change-Id: Ie452516655cbd40d63bdad3635fd66693e40ce34 Closes-Bug: #1917648
37 lines
1.3 KiB
Django/Jinja
37 lines
1.3 KiB
Django/Jinja
{% set cloudkitty_log_dir = '/var/log/kolla/cloudkitty' %}
|
|
{% set binary_path = '/usr/bin' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
|
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ cloudkitty_api_port }}
|
|
|
|
ServerSignature Off
|
|
ServerTokens Prod
|
|
TraceEnable off
|
|
TimeOut {{ kolla_httpd_timeout }}
|
|
KeepAliveTimeout {{ kolla_httpd_keep_alive }}
|
|
|
|
ErrorLog "{{ cloudkitty_log_dir }}/apache-error.log"
|
|
<IfModule log_config_module>
|
|
CustomLog "{{ cloudkitty_log_dir }}/apache-access.log" common
|
|
</IfModule>
|
|
|
|
{% if cloudkitty_logging_debug | bool %}
|
|
LogLevel info
|
|
{% endif %}
|
|
|
|
<VirtualHost *:{{ cloudkitty_api_port }}>
|
|
|
|
ErrorLog "{{ cloudkitty_log_dir }}/cloudkitty-api-error.log"
|
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
|
CustomLog "{{ cloudkitty_log_dir }}/cloudkitty-api-access.log" logformat
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
WSGIDaemonProcess cloudkitty group=cloudkitty processes={{ openstack_service_workers }} threads=1 user=cloudkitty
|
|
WSGIProcessGroup cloudkitty
|
|
WSGIScriptAlias / "{{ binary_path }}/cloudkitty-api"
|
|
|
|
<Directory "{{ binary_path }}">
|
|
<FilesMatch "^cloudkitty-api$">
|
|
Require all granted
|
|
</FilesMatch>
|
|
</Directory>
|
|
|
|
</VirtualHost>
|