Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions agent/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions agent/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions agent/templates/proxy/nginx.conf.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -207,7 +207,7 @@ server {
return 301 http://ssl.{{ domain }}$request_uri;
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the PR's goal of preserving request bodies on redirects, this ACME challenge redirect should also be changed from 301 to 308. While ACME challenges typically use GET requests, using 308 maintains consistency with the other permanent redirects in this configuration and follows the same principle of preserving request methods.

Suggested change
return 301 http://ssl.{{ domain }}$request_uri;
return 308 http://ssl.{{ domain }}$request_uri;

Copilot uses AI. Check for mistakes.
}
location / {
return 301 https://$host$request_uri;
return 308 https://$host$request_uri;
}
}

Expand Down