diff --git a/agent/bench.py b/agent/bench.py index 5a315812..33ebb50b 100644 --- a/agent/bench.py +++ b/agent/bench.py @@ -847,10 +847,10 @@ def force_update_limits(self, memory_high, memory_max, memory_swap, vcpu): self._update_runtime_limits(memory_high, memory_max, memory_swap, vcpu) self._start() - def update_runtime_limits(self): - memory_high = self.bench_config.get("memory_high") - memory_max = self.bench_config.get("memory_max") - memory_swap = self.bench_config.get("memory_swap") + def update_runtime_limits(self, multiplier=1.0): + memory_high = self.bench_config.get("memory_high") * multiplier + memory_max = self.bench_config.get("memory_max") * multiplier + memory_swap = self.bench_config.get("memory_swap") * multiplier vcpu = self.bench_config.get("vcpu") if not any([memory_high, memory_max, memory_swap, vcpu]): return diff --git a/agent/server.py b/agent/server.py index 4f1e7ff4..5d49a23d 100644 --- a/agent/server.py +++ b/agent/server.py @@ -492,12 +492,14 @@ def update_site_migrate_job( site.run_app_scripts(before_migrate_scripts) try: + target.update_runtime_limits(2) site.migrate( skip_search_index=skip_search_index, skip_failing_patches=skip_failing_patches, ) finally: site.log_touched_tables() + target.update_runtime_limits() with suppress(Exception): site.bench_execute( diff --git a/agent/templates/proxy/nginx.conf.jinja2 b/agent/templates/proxy/nginx.conf.jinja2 index 1d82df1f..2d8d43ca 100644 --- a/agent/templates/proxy/nginx.conf.jinja2 +++ b/agent/templates/proxy/nginx.conf.jinja2 @@ -116,7 +116,7 @@ server { {% if host_options.redirect %} location / { - return 301 https://{{ host_options.redirect }}$request_uri; + return 308 https://{{ host_options.redirect }}$request_uri; } {% else %} @@ -207,7 +207,7 @@ server { return 301 http://ssl.{{ domain }}$request_uri; } location / { - return 301 https://$host$request_uri; + return 308 https://$host$request_uri; } }