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 <IagoFilipe.EstrelaBarros@windriver.com>
Change-Id: I89012d7f8c7693cd3dc078d9f67ddffb4308e254
This commit is contained in:
Iago Estrela 2022-05-19 10:49:20 -03:00
parent 2401014697
commit dc7c3c9380

View File

@ -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.