]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: increase nginx cache size
authorGrant Slater <git@firefishy.com>
Wed, 1 Jun 2016 21:53:35 +0000 (22:53 +0100)
committerGrant Slater <git@firefishy.com>
Wed, 1 Jun 2016 21:53:45 +0000 (22:53 +0100)
cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb
cookbooks/nginx/attributes/default.rb
roles/imagery.rb

index 50b3070c99abb908fc3e9f054dfb235b8a790ba6..fc0b9e3943d6f640d7ca5bdc475022b1a1c801bf 100644 (file)
@@ -10,6 +10,7 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
   # Caching
   fastcgi_cache "fastcgi_cache_zone";
   fastcgi_cache_key "<%= @layer %><%= @revision %> $request_method $1 $2 $3";
+  fastcgi_keep_conn on;
   fastcgi_cache_lock on;
   fastcgi_cache_lock_timeout 30s;
   fastcgi_cache_valid 200 21d;
index 4e22759bf3b94bf2110d7915416c620a2cf68c24..fc2573314efca3721091c0897fbc67b7ad8f19e4 100644 (file)
@@ -1,11 +1,11 @@
 # Tuning for nginx fastcgi cache zone
 default[:nginx][:cache][:fastcgi][:enable] = false
-default[:nginx][:cache][:fastcgi][:keys_zone] = "fastcgi_cache_zone:32m"
-default[:nginx][:cache][:fastcgi][:inactive] = "30d"
-default[:nginx][:cache][:fastcgi][:max_size] = "2048m"
+default[:nginx][:cache][:fastcgi][:keys_zone] = "fastcgi_cache_zone:32M"
+default[:nginx][:cache][:fastcgi][:inactive] = "45d"
+default[:nginx][:cache][:fastcgi][:max_size] = "2048M"
 
 # Tuning for nginx proxy cache zone
 default[:nginx][:cache][:proxy][:enable] = false
-default[:nginx][:cache][:proxy][:keys_zone] = "proxy_cache_zone:32m"
-default[:nginx][:cache][:proxy][:inactive] = "30d"
-default[:nginx][:cache][:proxy][:max_size] = "2048m"
+default[:nginx][:cache][:proxy][:keys_zone] = "proxy_cache_zone:32M"
+default[:nginx][:cache][:proxy][:inactive] = "45d"
+default[:nginx][:cache][:proxy][:max_size] = "2048M"
index 9106f932995bf7ff552411bfead1d4de74c3a482..ba300985290829f01ef2a674c8ac09d72f22e44e 100644 (file)
@@ -32,7 +32,10 @@ default_attributes(
   :nginx => {
     :cache => {
       :fastcgi => {
-        :enable => true
+        :enable => true,
+        :keys_zone => "fastcgi_cache_zone:256M",
+        :inactive => "45d",
+        :max_size => "51200M"
       }
     }
   }