Welcome to Centmin Mod Community
Register Now

Nginx - StartLimitInterval

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by buik, Oct 2, 2022.

Tags:
  1. buik

    buik “The best traveler is one without a camera.”

    1,969
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,635
    Local Time:
    7:11 AM
    I am testing CMM8 with some test sites.
    I notice that the following Nginx systemd parameter is included
    (seems to be already present in CMM7 since April 2022).


    Why is an interval of 30 included?
    If you want to quickly tweak and adjust something in the config and then restart.
    You can go wait for 30 seconds. Because of the limit set earlier.

    Looking at Red Hat upstream Nginx. Then no limit is included.

    Why is there a limit included?
     
  2. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:11 PM
    Nginx 1.25.x
    MariaDB 10.x
    FYI as 130.00beta01 isn't the primary branch on Github searching might be easier via Sourcegraph for 130.00beta01 i.e. StartLimitInterval and Github Blame for inc/nginx_install.inc for this is centminmod/inc/nginx_install.inc at 130.00beta01 · centminmod/centminmod related commit add systemd service auto restart for nginx, php-fpm & redis · centminmod/centminmod@67b07bf

    Ah yes I can see that being problematic after 3 manual Nginx restarts successively. AFAIK default is 5 restarts in 10 seconds without my added settings to support automatic service restart on service failures.
    Code (Text):
    journalctl -xe --no-pager | egrep -v 'Blocked' | sed -e "s|$HOSTNAME|hostname|g" | tail -20
    -- Subject: Unit nginx.service has finished shutting down
    -- Defined-By: systemd
    -- Support: https://access.redhat.com/support
    -- 
    -- Unit nginx.service has finished shutting down.
    Oct 02 08:37:27 hostname systemd[1]: nginx.service: Start request repeated too quickly.
    Oct 02 08:37:27 hostname systemd[1]: nginx.service: Failed with result 'start-limit-hit'.
    -- Subject: Unit failed
    -- Defined-By: systemd
    -- Support: https://access.redhat.com/support
    -- 
    -- The unit nginx.service has entered the 'failed' state with result 'start-limit-hit'.
    Oct 02 08:37:27 hostname systemd[1]: Failed to start Centmin Mod NGINX Server.
    -- Subject: Unit nginx.service has failed
    -- Defined-By: systemd
    -- Support: https://access.redhat.com/support
    -- 
    -- Unit nginx.service has failed.
    -- 
    -- The result is failed.
    

    Maybe raising the StartLimitBurst from 2 to 10 or something?
     
  3. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:11 PM
    Nginx 1.25.x
    MariaDB 10.x
    FYI, just updated 130.00beta01 to raise that value from 2 to 15 so up to 15 manual restarts in 30 second interval should work. That's like 1 restart every 2 seconds - I don't think end users are that fast at config change + restarts :D
     
  4. buik

    buik “The best traveler is one without a camera.”

    1,969
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,635
    Local Time:
    7:11 AM
    3 or 5. As 10 or even 15 almost sounds like a semi loop. Should there really be a software / hardware error.
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:11 PM
    Nginx 1.25.x
    MariaDB 10.x
  6. buik

    buik “The best traveler is one without a camera.”

    1,969
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,635
    Local Time:
    7:11 AM
  7. eva2000

    eva2000 Administrator Staff Member

    52,186
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:11 PM
    Nginx 1.25.x
    MariaDB 10.x
    Makes sense. Just updated to lower it back from 15 to 5 :)