From 22dc557548791a41e152d5eaef217fb799204451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Robles?= Date: Wed, 19 Jul 2023 15:01:12 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20add=20census=20data=20second=20b?= =?UTF-8?q?atch=20will=20not=20be=20executed=20(#342)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parent issue: https://github.com/sequentech/meta/issues/119 --- config.yml | 12 +++++++++++- doc/devel/auth1.config.yml | 9 ++++++++- doc/devel/auth2.config.yml | 9 ++++++++- doc/devel/sequent.config.yml | 9 ++++++++- oneserver/templates/nginx.conf | 4 ++++ sequent-ui/templates/SequentConfig.js | 3 +++ 6 files changed, 42 insertions(+), 4 deletions(-) diff --git a/config.yml b/config.yml index 091ab32..2059ff0 100644 --- a/config.yml +++ b/config.yml @@ -174,6 +174,13 @@ config: # value is low to avoid denial of service attacks. client_max_header_size: 8k + # This changes proxy_connect_timeout/proxy_send_timeout/proxy_read_timeout + # in the nginx web server. + # Any request to the server will timeout with a 504 code if the server + # doesn't answer after this time. + # Note that this value is not higher to avoid denial of service attacks. + nginx_timeout_secs: 120 + # Path of the TLS PEM public certificate. # # Requirements: @@ -622,7 +629,10 @@ config: # this parameter sets the batch size # 0 means doing the import in only one batch always # allowed values: integer number >= 0 - census_import_batch: 500 + # Note that if the value is very large, the http request could timeout. + # You might also want to scale up increase + # config.http.nginx_timeout_secs in that case. + census_import_batch: 200 # If you want tallies to be linked and downloaded from a different URL, # change this variable from false to a string. This could be an example: diff --git a/doc/devel/auth1.config.yml b/doc/devel/auth1.config.yml index ec8cd2e..33fde80 100644 --- a/doc/devel/auth1.config.yml +++ b/doc/devel/auth1.config.yml @@ -175,6 +175,13 @@ config: # value is low to avoid denial of service attacks. client_max_header_size: 8k + # This changes proxy_connect_timeout/proxy_send_timeout/proxy_read_timeout + # in the nginx web server. + # Any request to the server will timeout with a 504 code if the server + # doesn't answer after this time. + # Note that this value is not higher to avoid denial of service attacks. + nginx_timeout_secs: 120 + # Path of the TLS PEM public certificate. # # Requirements: @@ -610,7 +617,7 @@ config: # this parameter sets the batch size # 0 means doing the import in only one batch always # allowed values: integer number >= 0 - census_import_batch: 500 + census_import_batch: 200 # If you want tallies to be linked and downloaded from a different URL, # change this variable from false to a string. This could be an example: diff --git a/doc/devel/auth2.config.yml b/doc/devel/auth2.config.yml index fad87b1..2b88ed2 100644 --- a/doc/devel/auth2.config.yml +++ b/doc/devel/auth2.config.yml @@ -175,6 +175,13 @@ config: # value is low to avoid denial of service attacks. client_max_header_size: 8k + # This changes proxy_connect_timeout/proxy_send_timeout/proxy_read_timeout + # in the nginx web server. + # Any request to the server will timeout with a 504 code if the server + # doesn't answer after this time. + # Note that this value is not higher to avoid denial of service attacks. + nginx_timeout_secs: 120 + # Path of the TLS PEM public certificate. # # Requirements: @@ -617,7 +624,7 @@ config: # this parameter sets the batch size # 0 means doing the import in only one batch always # allowed values: integer number >= 0 - census_import_batch: 500 + census_import_batch: 200 # If you want tallies to be linked and downloaded from a different URL, # change this variable from false to a string. This could be an example: diff --git a/doc/devel/sequent.config.yml b/doc/devel/sequent.config.yml index b11203f..a89e990 100644 --- a/doc/devel/sequent.config.yml +++ b/doc/devel/sequent.config.yml @@ -175,6 +175,13 @@ config: # value is low to avoid denial of service attacks. client_max_header_size: 8k + # This changes proxy_connect_timeout/proxy_send_timeout/proxy_read_timeout + # in the nginx web server. + # Any request to the server will timeout with a 504 code if the server + # doesn't answer after this time. + # Note that this value is not higher to avoid denial of service attacks. + nginx_timeout_secs: 120 + # Path of the TLS PEM public certificate. # # Requirements: @@ -624,7 +631,7 @@ config: # this parameter sets the batch size # 0 means doing the import in only one batch always # allowed values: integer number >= 0 - census_import_batch: 500 + census_import_batch: 200 # If you want tallies to be linked and downloaded from a different URL, # change this variable from false to a string. This could be an example: diff --git a/oneserver/templates/nginx.conf b/oneserver/templates/nginx.conf index 5507e16..1f702f5 100644 --- a/oneserver/templates/nginx.conf +++ b/oneserver/templates/nginx.conf @@ -51,6 +51,10 @@ http { keepalive_timeout 15; send_timeout 10; + proxy_connect_timeout {{ config.http.nginx_timeout_secs }}s; + proxy_send_timeout {{ config.http.nginx_timeout_secs }}s; + proxy_read_timeout {{ config.http.nginx_timeout_secs }}s; + # server_names_hash_bucket_size 64; # server_name_in_redirect off; diff --git a/sequent-ui/templates/SequentConfig.js b/sequent-ui/templates/SequentConfig.js index c0fe5dd..e5e0243 100644 --- a/sequent-ui/templates/SequentConfig.js +++ b/sequent-ui/templates/SequentConfig.js @@ -197,6 +197,9 @@ var SequentConfigData = { //Minimum loading time (milliseconds) minLoadingTime: {{ config.sequent_ui.min_loading_time }}, + // Server timeout (seconds) + serverTimeoutSeconds: {{ config.http.nginx_timeout_secs }}, + // gui-admin allows to import users from a csv, importing users in batches // this parameter sets the batch size // 0 means doing the import in only one batch always