Support #20680
Updated by Peter Amstutz 11 months ago
The
arvados config:
<pre>
API:
MaxConcurrentRequests: {{ ("__CONTROLLER_NGINX_WORKERS__" or grains['num_cpus'])|int * 2 }}
MaxQueuedRequests: __CONTROLLER_MAX_CONCURRENT_REQUESTS__
</pre>
nginx config:
<pre>
passenger:
passenger_ruby: {{ passenger_ruby }}
passenger_max_pool_size: {{ "__CONTROLLER_NGINX_WORKERS__" or grains['num_cpus'] }}
{%- if max_reqs != "" %}
# Default is 100 -- Configuring this a bit higher than API.MaxConcurrentRequests
# to be able to handle /metrics requests even on heavy load situations.
passenger_max_request_queue_size: {{ ("__CONTROLLER_NGINX_WORKERS__" or grains['num_cpus'])|int * 2 + 1 }}
{%- endif %}
</pre>
We should rename NGINX_WORKERS to something like CONTROLLER_WORKERS or CONTROLLER_REQUEST_HANDLERS
We should rename CONTROLLER_MAX_CONCURRENT_REQUESTS in local.params CONTROLLER_MAX_QUEUED_REQUESTS
We should also modify some defaults:
<pre>
# Maximum number of concurrent requests to process concurrently
# in a single service process, or 0 for no limit.
MaxConcurrentRequests: 4
# Maximum number of incoming requests to hold in a priority
# queue waiting for one of the MaxConcurrentRequests slots to be
# free. When the queue is longer than this, respond 503 to the
# lowest priority request.
#
# If MaxQueuedRequests is 0, respond 503 immediately to
# additional requests while at the MaxConcurrentRequests limit.
MaxQueuedRequests: 128
# Number of times a container can be unlocked before being
# automatically cancelled.
MaxDispatchAttempts: 20
</pre>