From bedccc8739cbe6f02250caa3555babf1da88da73 Mon Sep 17 00:00:00 2001 From: Janis Date: Wed, 29 Nov 2023 19:14:24 +0100 Subject: [PATCH] Update nginxHandler.py with worker_processes and events configuration --- app/nginxHandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/nginxHandler.py b/app/nginxHandler.py index 39f7e52..c0527e9 100644 --- a/app/nginxHandler.py +++ b/app/nginxHandler.py @@ -30,7 +30,11 @@ class NginxHandler: print('port_ip_map: {}'.format(port_ip_map)) nginx_conf = open(self.config_path, 'w+') nginx_conf.truncate() - nginx_conf.write('events { }\n') + nginx_conf.write('worker_processes 5;\n') + nginx_conf.write('events { \n') + nginx_conf.write(' worker_connections 1024;\n') + nginx_conf.write(' multi_accept on;\n') + nginx_conf.write('}\n') nginx_conf.write('stream {\n') # This looks confusing, but the nginx.conf looks good when it's done