20468: Adds config knobs for RailsAPI & controller performance tuning.
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_passenger.sls
index c14fbd1f59214263bca6634a20a3b11bf4ea08cf..775ff80fe44450f5ecea970c0005ef0adfb01d4d 100644 (file)
@@ -21,6 +21,11 @@ nginx:
   ### PASSENGER
   passenger:
     passenger_ruby: {{ passenger_ruby }}
+    passenger_max_pool_size: {{ "__CONTROLLER_NGINX_WORKERS__" or grains['num_cpus'] }}
+    {%- if "__CONTROLLER_MAX_CONCURRENT_REQUESTS__" != "" %}
+    # Default is 100
+    passenger_max_request_queue_size: __CONTROLLER_MAX_CONCURRENT_REQUESTS__
+    {%- endif %}
 
   ### SERVER
   server:
@@ -36,7 +41,10 @@ nginx:
       # include: 'modules-enabled/*.conf'
       load_module: {{ passenger_mod }}
       {% endif %}
-      worker_processes: 4
+      worker_processes: {{ "__CONTROLLER_NGINX_WORKERS__" or grains['num_cpus'] }}
+      worker_rlimit_nofile: 4096
+      events:
+        worker_connections: 1024
 
   ### SNIPPETS
   snippets: