From e1b94d9ed81bcff5ccf47eac95f8cc5e4a022b7a Mon Sep 17 00:00:00 2001 From: Anna Pendleton Date: Mon, 11 Mar 2024 20:10:19 +0000 Subject: [PATCH] locust close connections for each request --- .../locust-load-inference/locust-docker/locust-tasks/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark/tools/locust-load-inference/locust-docker/locust-tasks/tasks.py b/benchmarks/benchmark/tools/locust-load-inference/locust-docker/locust-tasks/tasks.py index ae13434aa..fa934be42 100644 --- a/benchmarks/benchmark/tools/locust-load-inference/locust-docker/locust-tasks/tasks.py +++ b/benchmarks/benchmark/tools/locust-load-inference/locust-docker/locust-tasks/tasks.py @@ -107,7 +107,7 @@ def lm_generate(self): prompt = test_data[random.randrange(0, len(test_data))] request = generate_request(model_params, prompt) - headers = {"User-Agent": "Benchmark Client"} + headers = {"User-Agent": "Benchmark Client", 'Connection':'close'} logging.info(f"Sending request: {request}") with self.client.post("/generate", headers=headers, json=request, catch_response=True) as resp: if resp.status_code != 200: