Skip to content

Commit a13d3f9

Browse files
committedJan 22, 2015
Configureable WSGI params
1 parent 5c04509 commit a13d3f9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
 

‎manifests/init.pp

+12
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,15 @@
358358
# Trigges the creation of metricaccess.log which logs access to Whisper
359359
# and RRD data files
360360
# Default is 'False' (String)
361+
# [*wsgi_processes*]
362+
# WSGI process count.
363+
# Default is 5
364+
# [*wsgi_threads*]
365+
# WSGI process threads.
366+
# Default is 5
367+
# [*wsgi_inactivity-timeout*]
368+
# WSGI inactivity-timeout in seconds.
369+
# Default is 120
361370
#
362371
# === Examples
363372
#
@@ -520,6 +529,9 @@
520529
$gr_log_cache_performance = 'False',
521530
$gr_log_rendering_performance = 'False',
522531
$gr_log_metric_access = 'False',
532+
$wsgi_processes = 5,
533+
$wsgi_threads = 5,
534+
$wsgi_inactivity_timeout = 120,
523535
) inherits graphite::params {
524536
# Validation of input variables.
525537
# TODO - validate all the things

‎templates/etc/apache2/sites-available/graphite.conf.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ WSGISocketPrefix <%= scope.lookupvar('graphite::params::apache_wsgi_socket_prefi
2626

2727
# I've found that an equal number of processes & threads tends
2828
# to show the best performance for Graphite (ymmv).
29-
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
29+
WSGIDaemonProcess graphite processes=<%= scope.lookupvar('graphite::wsgi_processes') -%> threads=<%= scope.lookupvar('graphite::wsgi_threads') -%> display-name='%{GROUP}' inactivity-timeout=<%= scope.lookupvar('graphite::wsgi_inactivity_timeout') %>
3030
WSGIProcessGroup graphite
3131
WSGIApplicationGroup %{GLOBAL}
3232
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}

0 commit comments

Comments
 (0)