Thanks for responding back.
Setup:
I have a nginx server at front with below configuration, there are python wrappers used to initialise the configs.
NGINX_WORKER_CONNECTION_COUNT = 8192
events = Section( ‘events’, worker_connections=NGINX_WORKER_CONNECTION_COUNT )
http = Section( ‘http’, access_log=[‘logs/nginx.access.log’, ‘combined’], include=os.path.join(self.env.root_path, ‘conf’, ‘mime.types’), ssl_certificate=os.path.join(self.env.var_path, ‘identity.cert’), ssl_certificate_key=os.path.join(self.env.var_path, ‘identity.key’) )
http = Section(
‘http’,
access_log=[‘logs/nginx.access.log’, ‘combined’],
include=os.path.join(self.env.root_path, ‘conf’, ‘mime.types’),
ssl_certificate=os.path.join(self.env.var_path, ‘cert’),
ssl_certificate_key=os.path.join(self.env.var_path, ‘key’)
)
http.sections.add(
Section(
‘server’,
duplicate_options(‘listen’, ([‘{0} ipv6only=off ssl’.format(scheduler_healthcheck_port)])),
Location(
‘/admin’,
KeyMultiValueOption(‘return’, value=[200, ‘GOOD’])
),
Location(
‘/’,
KeyValueOption(‘proxy_pass’, ‘http://127.0.0.1:{}/’.format(scheduler_health_port))
),
Location(
‘^~ /healthz’,
KeyValueOption(‘proxy_pass’, ‘http://127.0.0.1:{}/healthz’.format(scheduler_health_port))
),
Location(
‘^~ /vendor’,
KeyValueOption(‘proxy_pass’, ‘http://127.0.0.1:{}/vendor’.format(scheduler_health_port))
),
Location(
‘^~ /static’,
KeyValueOption(‘proxy_pass’, ‘http://127.0.0.1:{}/static’.format(scheduler_health_port))
),
Location(
‘/stream’,
KeyValueOption(‘proxy_pass’, ‘http://127.0.0.1:{}/stream’.format(scheduler_health_port)),
KeyValueOption(‘proxy_http_version’, ‘1.1’),
KeyValuesMultilines(‘proxy_set_header’,
values=[[‘Host’, ‘$host’], [‘Upgrade’, ‘$http_upgrade’],
[‘Connection’, ‘upgrade’], [‘X-Forwarded-For’, ‘$proxy_add_x_forwarded_for’]]),
KeyValueOption(‘proxy_read_timeout’, 86400)
)
)
)
return Config(
events,
http,
worker_processes=1,
worker_rlimit_nofile=20248,
error_log=‘logs/nginx_error.log’,
pid=LOGS_NGINX_PID_FILE,
daemon=‘on’
)
So when trying to load the app on HTTP its perfectly fine, over HTTPs I am seeing the issue in connection esthablishment, most cases it connects after several seconds. I cannot reproduce it locally, because when I run it locally I use without https.