Join the community today
Register Now

Beta Branch update nginx backlog defaults in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 2, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    50,928
    11,808
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,267
    Local Time:
    2:59 AM
    Nginx 1.25.x
    MariaDB 10.x
    update nginx backlog defaults in 123.09beta01

    - Add new optional variable, AUTOHARDTUNE_NGINXBACKLOG='n' which is disabled by default but can be enabled as AUTOHARDTUNE_NGINXBACKLOG='y' in persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 4 recompile/upgrades of nginx server or fresh centmin mod installs. This changes and overrides the nginx backlog defaults specifically for HTTPS vhosts while non-HTTPS vhosts are already take care of in /usr/local/nginx/conf/conf.d/virtual.conf via listen backlog socket directive dynamically setup nginx routines in centmin mod. Setting the backlog socket directive for HTTPS vhost is tricky in terms of automating the insertion of backlog socket directive in listen directive for HTTPS vhosts due to ip/port pairing rules only allowing backlog directive to be set once on all nginx vhosts on the server per ip/port pairs - so once for ip/port 80 and once for ip/port 443. So incorrectly manually setting this by end users can result in duplication directive option errors and prevent nginx server from restarting. Note, specifically setting backlog listen directive on a HTTPS vhost the proper way like in non-HTTPS vhosts at /usr/local/nginx/conf/conf.d/virtual.conf will override whatever custom overriden defaults are configured by this committed change.
    - Basically, only change is changing and raising the nginx source codes' default NGX_LISTEN_BACKLOG in nginx version directory at /svr-setup/nginx-1.xx.x/src/os/unix/ngx_linux_config.h from hardcoded value of 511 to dynamically calculated value based on centmin mod's detected system TCP environment settings and only for non-openvz systems - i.e. dedicated servers, xen and kvm vps systems. OpenVZ VPS systems aren't capable of utilising this optimisation so if centmin mod detects OpenVZ VPS systems, it will skip this change if AUTOHARDTUNE_NGINXBACKLOG='y' in persistent config file /etc/centminmod/custom_config.inc

    Continue reading...

    123.09beta01 branch


     
  2. eva2000

    eva2000 Administrator Staff Member

    50,928
    11,808
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,267
    Local Time:
    2:59 AM
    Nginx 1.25.x
    MariaDB 10.x