Commit 6e74d0cf76224a85ae8576c3efe7d11f8b7fb7c9

Authored by edulucio
1 parent 701daa4d
Exists in master

Atualizado os dados da empresa (endereço, telefone, etc...). Sugerir e setar um …

…valor de "request timeout" conforme a quantidade de memória e processadores disponíveis no servidor! By Questor
Showing 2 changed files with 31 additions and 2 deletions   Show diff stats
LBGenerator.tar.gz
No preview for this file type
install.bash
... ... @@ -64,8 +64,8 @@ EOF
64 64  
65 65 read -d '' COMPANY_F <<"EOF"
66 66 BR Light LTDA - LightBase Consulting in Public Software/LightBase Consultoria em Software Público
67   -Free Software + Our Ideas = Best Solution!/Software Livre + Nossas Idéias = Melhor Solução!
68   -+55-61-3347-1949 - http://www.LightBase.com.br - Brasil-DF
  67 +Software livre! Abrace essa idéia!/Free software! Embrace that idea!
  68 ++55-61-3347-1949/+55-61-3340-6966 - http://brlight.org/ - Brasil-DF
69 69 EOF
70 70  
71 71 f_begin "$TITLE_F" "$VERSION_F" "$ABOUT_F" "$WARNINGS_F" "$COMPANY_F"
... ... @@ -2167,6 +2167,35 @@ Use empty for \&quot;$THREADS_QTT\&quot; (good for most cases)!
2167 2167  
2168 2168 f_ez_sed "<THREADS_QTT>" "$THREADS_QTT" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
2169 2169  
  2170 + f_srv_memory
  2171 +
  2172 + # NOTA: A estratégia abaixo foi utilizada pq o bash por padrão não
  2173 + # permite cálculo de ponto flutuante! By Questor
  2174 + REQ_TIMEOUT=$(awk '{printf("%.8f\n",(($1/25550)*$2))}' <<<" $F_SRV_MEMORY_R $PROCESSES_QTT ")
  2175 +
  2176 + # NOTA: A estratégia abaixo foi utilizada para arredondar o valor
  2177 + # (remover o ponto flutuante)! By Questor
  2178 + REQ_TIMEOUT=${REQ_TIMEOUT%\.*}
  2179 +
  2180 + TOO_LOW_REQ_TIMEOUT=""
  2181 + if (( ${REQ_TIMEOUT} < 150 )) ; then
  2182 + TOO_LOW_REQ_TIMEOUT="
  2183 +* WARNING: THE INSTALLER HAS CALCULATED A TOO LOW TIMEOUT VALUE FOR THIS SERVER. TIMEOUTS BELOW 150 SECONDS ARE CONSIDERED TOO LOW. CONSIDER USING A SERVER WITH MORE PROCESSORS AND/OR MEMORY."
  2184 + fi
  2185 +
  2186 + # NOTE: Seta um valor adequado para "request timeout" conforme a
  2187 + # quantidade de núcleos e de memória da máquina! By Questor
  2188 + f_div_section
  2189 + f_get_usr_input "Enter the LBG - LBGenerator REQUEST TIMEOUT (numbers only, integers only).
  2190 +Use empty for \"$REQ_TIMEOUT\" (good for most cases and highly recommended)!
  2191 +* Decrease the value if you have application performance and server instability problems;
  2192 +* Higher values will cause server instability, crash and other unexpected results.$TOO_LOW_REQ_TIMEOUT" 1
  2193 + if [ -n "$GET_USR_INPUT_R" ] ; then
  2194 + REQ_TIMEOUT=$GET_USR_INPUT_R
  2195 + fi
  2196 +
  2197 + f_ez_sed "<REQ_TIMEOUT>" "$REQ_TIMEOUT" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
  2198 +
2170 2199 f_chk_by_path_hlp "$NGINX_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$NGINX_CONF_PATH/lbg.conf\"!"
2171 2200 F_BAK_MD_R=1
2172 2201 if [ ${F_CHK_BY_PATH_HLP_R} -eq 1 ] ; then
... ...