Want to subscribe to topics you're interested in?
Become a Member

PHP-FPM Upgrading nginx stuck or takes a long time?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jon Snow, Dec 5, 2024.

  1. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    3:10 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I'm trying to upgrade to nginx 1.27.3 but it's stuck:
    Code (Text):
    real    0m0.143s
    user    0m0.048s
    sys    0m0.094s
    
    Wed Dec  4 03:21:16 PM EST 2024
    Success: Nginx was installed properly
    
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
    /usr/local/nginx/conf/conf.d/demodomain.com.conf
    /usr/local/nginx/conf/conf.d/virtual.conf
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:29:  #add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:38:  #spdy_headers_comp 5;
    ---
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:11:  listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:12:  listen   [::]:443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:29:  #add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:38:  #spdy_headers_comp 5;
    
    remove deprecated HTTP/2 variables in Nginx 1.19.7+
    
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
    /usr/local/nginx/conf/conf.d/demodomain.com.conf
    /usr/local/nginx/conf/conf.d/virtual.conf
    ---
    
    Update deprecated listen directive's http2 option in Nginx 1.25.1+
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
    /usr/local/nginx/conf/conf.d/demodomain.com.conf
    /usr/local/nginx/conf/conf.d/virtual.conf
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:11:  listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:12:  listen   [::]:443 ssl http2;
    ---
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:11:  listen 443 ssl;
    /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:12:  http2 on;
    
    ---------------------------------------------------------------------------
    nginx master id: 1179562
    ---------------------------------------------------------------------------
    Active connections: 191
    server accepts handled requests
     27539779 27539779 115972510
    Reading: 0 Writing: 2 Waiting: 189
    ---------------------------------------------------------------------------
    kill -USR2 1179562
        PID    PPID USER     %CPU    VSZ WCHAN  COMMAND
    1179562       1 root      0.0 133812 sigsus nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    1416265 1179562 nginx     0.7 349832 ep_pol nginx: worker process
    1416266 1179562 nginx     0.5 349832 ep_pol nginx: worker process
    1416267 1179562 nginx     0.6 349832 ep_pol nginx: worker process
    1506919 1179562 root      2.6  95884 sigsus nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    1506920 1506919 nginx     1.6 311904 ep_pol nginx: worker process
    1506921 1506919 nginx     1.6 311904 ep_pol nginx: worker process
    1506922 1506919 nginx     1.6 311904 ep_pol nginx: worker process
    
    -rwxr-xr-x. 1 root root 1.5M Dec  4 15:21 /usr/local/sbin/nginx
    -rwxr-xr-x. 1 root root 1.5M Aug 24 22:44 /usr/local/sbin/nginx.old
    ---------------------------------------------------------------------------
    Active connections: 195
    server accepts handled requests
     27539790 27539790 115972574
    Reading: 0 Writing: 1 Waiting: 194
    ---------------------------------------------------------------------------
    kill -WINCH 1179562
        PID    PPID USER     %CPU    VSZ WCHAN  COMMAND
    1179562       1 root      0.0 133812 sigsus nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    1506919 1179562 root      1.3  95884 sigsus nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    1506920 1506919 nginx     1.5 311904 ep_pol nginx: worker process
    1506921 1506919 nginx     1.5 311904 ep_pol nginx: worker process
    1506922 1506919 nginx     1.5 311904 ep_pol nginx: worker process
    ---------------------------------------------------------------------------
    


     
  2. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    3:10 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I cancelled it CTRL C and my XF admin panel says:
    nginx/1.27.3
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Did you enable NGINX_ZERODT='y' in persistent config file? If you did you enabled Nginx zero downtime mode during Nginx upgrades which means Nginx waits until all existing running Nginx connections are complete before switching over to the upgraded Nginx binary. If you have alot of existing running Nginx connections on an active site(s), then you may end up waiting quite a while for those connections to complete before Nginx upgrade process switches to upgraded Nginx version binary. The default is to have NGINX_ZERODT='n' disabled so that upgraded Nginx binaries immediate close and switch Nginx binaries. This immediately terminates existing Nginx connections. So pick your desired Nginx upgrade outcome.
     
  4. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    3:10 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Yup:
    Code (Text):
    NGINX_ZERODT='y'


    If I changed it to no, would I have to alter anything else?

    Code (Text):
    LETSENCRYPT_DETECT='y'
    DUALCERTS='y'
    MARCH_TARGETNATIVE='n'
    PHP_PGO_ALWAYS='y'
    PHP_PGO='y'
    PHP_BROTLI='y'
    PHP_LZFOUR='y'
    PHP_LZF='y'
    PHP_ZSTD='y'
    DISABLE_IPVSIX='y'
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    NGINX_ZERODT='y'
    NGINX_LIBBROTLI='y'
    NGXDYNAMIC_BROTLI='y'
    AUDITD_ENABLE='y'
    ALERTEMAIL='xxx@gmail.com'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    SELFSIGNEDSSL_ECDSA='y'
    PHPFINFO='y'
    PHP_OVERWRITECONF='n'
    PYTHON_INSTALL_ALTERNATIVES='y'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    SELFSIGNEDSSL_ECDSA='y'
    PHPFINFO='y'
    PHP_OVERWRITECONF='n'
    PYTHON_INSTALL_ALTERNATIVES='y'
    


    Now that I look at it, I'm seeing some duplicates.