From: Grant Slater Date: Mon, 13 Jan 2020 14:54:04 +0000 (+0000) Subject: planet: Rate limit downloads to help fibre fault X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/1647548590878bfd153b8b8c74e73eda0b8a2cd3 planet: Rate limit downloads to help fibre fault --- diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index 28b1abdb8..5dd5953f8 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -97,6 +97,7 @@ end apache_module "cgid" apache_module "rewrite" apache_module "proxy_http" +apache_module "ratelimit" ssl_certificate "planet.openstreetmap.org" do domains ["planet.openstreetmap.org", "planet.osm.org"] diff --git a/cookbooks/planet/templates/default/apache.erb b/cookbooks/planet/templates/default/apache.erb index a67189a0d..8b46d6b04 100644 --- a/cookbooks/planet/templates/default/apache.erb +++ b/cookbooks/planet/templates/default/apache.erb @@ -64,6 +64,11 @@ RewriteRule ^(/cc\-by\-sa/changesets\-latest\.osm\.bz2)$ ${latestplanet:$1} [R,L] RewriteRule ^(/cc\-by\-sa/relations\-latest\.osm\.bz2)$ ${latestplanet:$1} [R,L] + # Temporary download rate limit due to upstream fibre connection issues. - 13 Jan 2020 + SetOutputFilter RATE_LIMIT + SetEnv rate-limit 400 + SetEnv rate-initial-burst 512 +