From dc7c3c93800a17e4031444b91880f84b0a33fb28 Mon Sep 17 00:00:00 2001 From: Iago Estrela Date: Thu, 19 May 2022 10:49:20 -0300 Subject: [PATCH] Fix sysinv-api crash with 250 parallel requests Sysinv WSGI server is crashing after receiving 250 requests in parallel in route creation endpoint due to limited number of threads to handle requests. Closes-Bug: 1974194 Test plan: PASS: Hit route creation endpoint 250 times in parallel and verify WSGI Server didn't restart. Signed-off-by: Iago Estrela Change-Id: I89012d7f8c7693cd3dc078d9f67ddffb4308e254 --- sysinv/sysinv/sysinv/sysinv/common/wsgi_service.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysinv/sysinv/sysinv/sysinv/common/wsgi_service.py b/sysinv/sysinv/sysinv/sysinv/common/wsgi_service.py index 2e428cdb22..29e61178ba 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/wsgi_service.py +++ b/sysinv/sysinv/sysinv/sysinv/common/wsgi_service.py @@ -53,11 +53,16 @@ class WSGIService(service.ServiceBase): elif IPAddress(host).version == 6: socket_family = socket.AF_INET6 + # If not defined, pool_size will default to 100. In order + # to increase the amount of threads handling multiple parallel + # requests to the wsgi application this parameter should be + # increased. self.server = wsgi.Server(CONF, name, self.app, host=host, port=port, socket_family=socket_family, - use_ssl=use_ssl) + use_ssl=use_ssl, + pool_size=250) def start(self): """Start serving this service using loaded configuration.