From 7b354da20f6c7670225a2d01913135b447fbf787 Mon Sep 17 00:00:00 2001 From: Oleg S Date: Tue, 2 May 2023 17:45:25 +0300 Subject: [PATCH] [Python] Flask: delete repeated tests (#8183) Issue #8178 --- frameworks/Python/flask/app.py | 1 + frameworks/Python/flask/benchmark_config.json | 4 ---- frameworks/Python/flask/nginx.conf | 4 ++-- frameworks/Python/flask/uwsgi.ini | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frameworks/Python/flask/app.py b/frameworks/Python/flask/app.py index 95446f76fae..edf901c047b 100755 --- a/frameworks/Python/flask/app.py +++ b/frameworks/Python/flask/app.py @@ -306,6 +306,7 @@ def run_app(): import fastwsgi response_server = "FastWSGI" response_add_date = False + fastwsgi.server.backlog = 4096 fastwsgi.run(app, host=opt.host, port=opt.port, loglevel=opt.verbose) if opt.server == 'socketify': diff --git a/frameworks/Python/flask/benchmark_config.json b/frameworks/Python/flask/benchmark_config.json index ff0a6e58764..dad6b8ef11a 100644 --- a/frameworks/Python/flask/benchmark_config.json +++ b/frameworks/Python/flask/benchmark_config.json @@ -26,12 +26,10 @@ "tags": [ ] }, "raw": { - "json_url": "/json-raw", "db_url": "/db-raw", "query_url": "/query-raw?queries=", "fortune_url": "/fortunes-raw", "update_url": "/updates-raw?queries=", - "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Micro", @@ -112,12 +110,10 @@ "tags": ["broken"] }, "pypy-raw": { - "json_url": "/json-raw", "db_url": "/db-raw", "query_url": "/query-raw?queries=", "fortune_url": "/fortunes-raw", "update_url": "/updates-raw?queries=", - "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Micro", diff --git a/frameworks/Python/flask/nginx.conf b/frameworks/Python/flask/nginx.conf index 4bc3c19350d..38c0c61341c 100644 --- a/frameworks/Python/flask/nginx.conf +++ b/frameworks/Python/flask/nginx.conf @@ -6,7 +6,7 @@ error_log stderr error; events { # This needed to be increased because the nginx error log said so. # http://nginx.org/en/docs/ngx_core_module.html#worker_connections - worker_connections 4095; + worker_connections 65535; multi_accept on; } @@ -37,7 +37,7 @@ http { # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/ # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn - listen 8080 default_server deferred reuseport backlog=4095; + listen 8080 default_server deferred reuseport backlog=65535; server_name localhost; location / { diff --git a/frameworks/Python/flask/uwsgi.ini b/frameworks/Python/flask/uwsgi.ini index ce8c20ed9fc..5c9f5b80227 100644 --- a/frameworks/Python/flask/uwsgi.ini +++ b/frameworks/Python/flask/uwsgi.ini @@ -2,7 +2,7 @@ master ; Increase listen queue used for nginx connecting to uWSGI. This matches ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn. -listen = 4096 +listen = 16384 ; for performance disable-logging ; use UNIX sockets instead of TCP loopback for performance