From a9e0c0fadf5f2e13e1a0465f960fd5b0ccf6b9b7 Mon Sep 17 00:00:00 2001 From: Balamurali M Date: Wed, 12 Nov 2025 17:40:02 +0530 Subject: [PATCH 1/2] fix(proxy): Preserve request body on redirect --- agent/templates/proxy/nginx.conf.jinja2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } From f84b1707a2dab1d8ab10aac11583a19b8176cf3c Mon Sep 17 00:00:00 2001 From: Balamurali M Date: Thu, 18 Dec 2025 15:56:09 +0530 Subject: [PATCH 2/2] fix(site): Double bench memory limit during migrate --- agent/bench.py | 8 ++++---- agent/server.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) 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(