Learn about Centmin Mod LEMP Stack today
Register Now

Nginx PageSpeed ngx_pagespeed version 1.9.32.1

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RoldanLT, Sep 18, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    8:05 AM
    1.11
    10.2
    Somebody already updated their server on this version?
    Or just installed centminmod with this ngx_pagespeed version?
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    wow that's one version jump from 1.8.31.4 beta :)

    let me try this on a test server first and read through their change logs at PageSpeed Release Notes - PageSpeed Module — Google Developers

     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    interesting one is

    This one also useful it seems
     
    Last edited: Sep 18, 2014
  4. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    8:05 PM
    Got my dedicated server so I installed all the latest goodies in there. What do you want me to test @eva2000
    Code:
    [root@ryan ~]# curl -I http://localhost/?ModPagespeed=on
    HTTP/1.1 200 OK
    Server: nginx centminmod
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    Vary: Accept-Encoding
    Date: Thu, 18 Sep 2014 00:57:21 GMT
    X-Page-Speed: 1.9.32.1-4238
    Cache-Control: max-age=0, no-cache
    
    [root@ryan ~]# curl -I http://localhost/?ModPagespeed=off
    HTTP/1.1 200 OK
    Server: nginx centminmod
    Date: Thu, 18 Sep 2014 00:58:19 GMT
    Content-Type: text/html; charset=utf-8
    Content-Length: 3801
    Last-Modified: Wed, 17 Sep 2014 22:07:44 GMT
    Connection: keep-alive
    Vary: Accept-Encoding
    ETag: "541a0630-ed9"
    Expires: Fri, 19 Sep 2014 00:58:19 GMT
    Cache-Control: max-age=86400
    Cache-Control: public, must-revalidate, proxy-revalidate
    Accept-Ranges: bytes
     
    Last edited: Sep 18, 2014
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    Awesome, well you did the first test = making sure nginx compiles and installs fine with ngx_pagespeed 1.9.32.1 beta and looks like it does :D

    Next would be seeing if instructions for enabling Pagespeed console work ngx_pagespeed install on Centmin Mod - Menu based Nginx installer for CentOS servers

    I would do this, but right now caught up in the centminmodbench.sh tests on Linode (time sensitive seeing as I am being billed hourly heh)
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    8:05 AM
    1.11
    10.2
    First error haha
    Code:
    # ngxrestart
    [0918/094346:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    [0918/094346:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx:                                            [  OK  ]
    Starting nginx: [0918/094346:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    [0918/094346:WARNING:google_message_handler.cc(38)] 'MessageBufferSize' is global and is ignored at this scope
                                                               [  OK  ]
    
    Then I remove this on my config:
    pagespeed MessageBufferSize 100000;

    Code:
    ]# ngxrestart
    [0918/094625:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx:                                            [  OK  ]
    Starting nginx: [0918/094625:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
                                                               [  OK  ]
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    @RoldanLT if you edit /usr/local/nginx/conf/pagespeed.conf and move this part
    Code:
    #######################################################
    # Set it to 0 if you want to disable this feature.
     pagespeed MessageBufferSize 100000;
    to /usr/local/nginx/conf/pagespeedadmin.conf
    Code:
    #######################################################
    # 1.8.31.2 beta required paths
    # https://developers.google.com/speed/pagespeed/module/admin
    ######################################
    pagespeed FileCachePath /var/ngx_pagespeed_cache;
    pagespeed StatisticsPath /ngx_pagespeed_statistics;
    pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
    pagespeed MessagesPath /ngx_pagespeed_message;
    pagespeed ConsolePath /pagespeed_console;
    pagespeed AdminPath /pagespeed_admin;
    pagespeed GlobalAdminPath /pagespeed_global_admin;
    
    #######################################################
    # Set it to 0 if you want to disable this feature.
     pagespeed MessageBufferSize 100000;
    
    then restart nginx

    does it get rid of at least one of the errors ?
     
  9. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    8:05 AM
    1.11
    10.2
    Same error:
    Code:
    # ngxrestart
    [0918/095850:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx:                                            [  OK  ]
    Starting nginx: [0918/095850:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
                                                               [  OK  ]
    
    Thanks Eva!
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    Interesting the remaining error should not be happening it sets each to 1 thread. But according to documentation for event workers like Nginx, you should have set to 4 each for NumRewriteThreads and NumExpensiveRewriteThreads

    so try these 2 options one at a time

    first try adding to /usr/local/nginx/conf/pagespeedadmin.conf the following 2 lines
    Code:
    pagespeed NumRewriteThreads 4;
    pagespeed NumExpensiveRewriteThreads 4;
    then restart nginx and see

    then try removing those 2 lines from /usr/local/nginx/conf/pagespeedadmin.conf and adding to /usr/local/nginx/conf/pagespeed.conf the 2 lines
    Code:
    pagespeed NumRewriteThreads 4;
    pagespeed NumExpensiveRewriteThreads 4;
    then restart nginx and see
     
  11. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    8:05 AM
    1.11
    10.2
    So when I try to add this:
    Code:
    pagespeed NumRewriteThreads 4;
    pagespeed NumExpensiveRewriteThreads 4;
    
    On /usr/local/nginx/conf/pagespeed.conf

    I got this error:
    Code:
    # ngxrestart
    [0918/101358:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    nginx: [emerg] "pagespeed" directive "NumRewriteThreads 4" 'NumRewriteThreads' is global and can't be set at this scope. in /usr/local/nginx/conf/pagespeed.conf:31
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    
    When I try to add it on:
    /usr/local/nginx/conf/pagespeedadmin.conf
    Code:
    # ngxrestart
    [0918/101502:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx:                                            [  OK  ]
    Starting nginx: [0918/101502:INFO:google_message_handler.cc(35)] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
                                                               [  OK  ]
    
    
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    first is as expected as those 2 can't be set in pagespeed.conf within vhost - but i recall github discussion of making them locally vhost supported so thought to try

    second, maybe a bug
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
  14. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    8:05 AM
    1.11
    10.2
    I just cleared svr-setup.
    rm -rf /svr-setup/*

    Then run menu #4 to re install it but same error.
    Not a big deal since my live forum loads fine :D
    I think it's just a notice or warning.
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah it could be a notice, i remember early 1.6.x ngx_pagespeed has such verbose nginx restarts
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    arrrrgh ! seems ngx_pagespeed 1.9.32.1 release breaks centmin mod Nginx install if using 1.8.31.4 as use the master branch of ngx_pagespeed

    Code:
                     from ../ngx_pagespeed-release-1.8.31.4-beta/src/ngx_base_fetch.h:48,
                     from ../ngx_pagespeed-release-1.8.31.4-beta/src/ngx_base_fetch.cc:19:
    ../ngx_pagespeed-release-1.8.31.4-beta/src/ngx_message_handler.h:40: error: expected class-name before ‘{’ token
    make[1]: *** [objs/addon/src/ngx_base_fetch.o] Error 1
    make[1]: Leaving directory `/svr-setup/nginx-1.7.5'
    make: *** [install] Error 2
    
    real    1m50.695s
    user    1m12.850s
    sys     0m24.573s
    egrep: /usr/local/nginx/conf/mime.types: No such file or directory
    grep: /usr/local/nginx/conf/mime.types: No such file or directory
    grep: /usr/local/nginx/conf/mime.types: No such file or directory
    grep: /usr/local/nginx/conf/mime.types: No such file or directory
    grep: /usr/local/nginx/conf/mime.types: No such file or directory
    Code:
    *************************************************
    * Post-Install Check List....
    *************************************************
    
    --------------------------------------------------------
    Check ccache Version:
    --------------------------------------------------------
    ccache version 3.1.6
    
    Copyright (C) 2002-2007 Andrew Tridgell
    Copyright (C) 2009-2011 Joel Rosdahl
    
    This program is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software
    Foundation; either version 3 of the License, or (at your option) any later
    version.
    
    --------------------------------------------------------
    Check Nginx Version:
    --------------------------------------------------------
    inc/centminfinish.inc: line 26: nginx: command not found
    
    this was while doing tests on linode

    Going to have to test 1.9.32.1 out afterall

    quick find and replace version in centmin.sh

    Code:
    sed -i 's/1.8.31.4/1.9.32.1/g' centmin.sh
    Code:
    grep SPEED centmin.sh     
    
    NGINX_PAGESPEED=y            # Install ngx_pagespeed
    NGINX_PAGESPEEDGITMASTER=y   # Install ngx_pagespeed from official github master instead
    NGXPGSPEED_VER='1.9.32.1-beta'
    NGINX_PAGESPEEDPSOL_VER='1.9.32.1'
    then recompile Nginx

    did initial Nginx install on 16GB 8CPU Linode Freemont (might as well as the benchmark failed on nginx install) and compiled fine.. time it took

    Code:
    tail -1 /root/centminlogs/centminmod_1.2.3-eva2000.08_180914-034241_nginx_upgrade.log
    Total Nginx Upgrade Time: 174.937422934 seconds
    
    did recompile of Nginx 1.7.5 to see what speed up ccache installed by Centmin Mod has on compiler caching of previously installed software
    Code:
    tail -1 /root/centminlogs/centminmod_1.2.3-eva2000.08_180914-040028_nginx_upgrade.log
    Total Nginx Upgrade Time: 102.748205703 seconds
    so ccache compiling caching saves around 72 seconds for recompiles :)
     
    Last edited: Sep 18, 2014
    • Like Like x 1
  17. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    interesting seems Nginx with ngx_pagespeed 1.9.32.1 only gets the info notices on Nginx restart on CentOS 6.5 but not CentOS 7.0

    Code:
    [root@centos7 ~]# nprestart
    Restarting nginx (via systemctl):                          [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    
     
  18. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    looks like ngx_pagespeed 1.9.32-1 beta in place optimisations don't work properly with Xenforo

    Code:
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Trying to serve rewritten resource in-place: https://community.centminmod.com/threads/poodle-attacks-on-sslv3-vulnerability.1651/page-2
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Cannot fetch url 'https://community.centminmod.com/threads/poodle-attacks-on-sslv3-vulnerability.1651/page-2': as https is not supported
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Trying to serve rewritten resource in-place: https://community.centminmod.com/threads/poodle-attacks-on-sslv3-vulnerability.1651/page-2
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Cannot fetch url 'https://community.centminmod.com/threads/poodle-attacks-on-sslv3-vulnerability.1651/page-2': as https is not supported
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Trying to serve rewritten resource in-place: https://community.centminmod.com/favicon.ico
    [Thu, 16 Oct 2014 02:14:57 GMT] [Info] [13901] Could not rewrite resource in-place because URL is not in cache: https://community.centminmod.com/favicon.ico
    
    [Thu, 16 Oct 2014 02:14:59 GMT] [Info] [13906] Trying to serve rewritten resource in-place: https://community.centminmod.com/index.php?tabalerts
    [Thu, 16 Oct 2014 02:14:59 GMT] [Info] [13906] Cannot fetch url 'https://community.centminmod.com/index.php?tabalerts': as https is not supported
    
    [Thu, 16 Oct 2014 02:15:05 GMT] [Info] [13900] Trying to serve rewritten resource in-place: https://community.centminmod.com/
    [Thu, 16 Oct 2014 02:15:05 GMT] [Info] [13900] Cannot fetch url 'https://community.centminmod.com/': as https is not supported
    [Thu, 16 Oct 2014 02:15:05 GMT] [Info] [13900] Trying to serve rewritten resource in-place: https://community.centminmod.com/
    [Thu, 16 Oct 2014 02:15:05 GMT] [Info] [13900] Cannot fetch url 'https://community.centminmod.com/': as https is not supported
    so disabling it in pagespeed.conf
    Code:
    pagespeed InPlaceResourceOptimization off;
     
    Last edited: Oct 16, 2014
    • Like Like x 1
  19. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    10:05 AM
    Nginx 1.13.x
    MariaDB 5.5