Welcome to Centmin Mod Community
Register Now

Beta Branch auto detect TCP Fast Open and auto add fastopen listen directive to n…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 10, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    12:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: Apr 10, 2017
  2. ahmed

    ahmed Active Member

    361
    49
    28
    Feb 21, 2017
    Ratings:
    +63
    Local Time:
    4:32 AM
    mine have this
    listen 8080 default_server backlog=2048 fastopen=256;

    I think I have reuse port:
    grep --color -Ro SO_REUSEPORT /usr/src/kernels/*

    Code (Text):
    /usr/src/kernels/3.10.0-514.10.2.el7.x86_64/include/net/sock.h:SO_REUSEPORT
    /usr/src/kernels/3.10.0-514.10.2.el7.x86_64/include/uapi/asm-generic/socket.h:SO_REUSEPORT
    /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/include/net/sock.h:SO_REUSEPORT
    /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/include/uapi/asm-generic/socket.h:SO_REUSEPORT
    


    we need to have an option in centmin to tell him that the default port for nginx is 8080 not 80

    for example when i install new domain in my system which I dont use 80 for nginx and the centminmod generates the default conf with port 80, it leads to nginx not starting
     
  3. ahmed

    ahmed Active Member

    361
    49
    28
    Feb 21, 2017
    Ratings:
    +63
    Local Time:
    4:32 AM
    I added it manyally, reuse port, since my kernel support it
     
  4. ahmed

    ahmed Active Member

    361
    49
    28
    Feb 21, 2017
    Ratings:
    +63
    Local Time:
    4:32 AM
    More over; why to put that into virtual.conf and it is the backend, and the front is the server with 443?
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    12:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah it assumes port 80 as that is default and virtual.conf is only nginx vhost that exists out of box installs when no other vhost is created. reuseport can only be set to once ip:port pairing for the entire server so you can't set it on every vhost so I chose virtual.conf. For no standard port configs like yours, you'd have to manually set up reuseport right now.
     
  6. ahmed

    ahmed Active Member

    361
    49
    28
    Feb 21, 2017
    Ratings:
    +63
    Local Time:
    4:32 AM
    so can I put fastopen on the 443 server!?
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    12:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  8. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    10:32 AM
    Mainline
    10.2
    I have added it manually now also. :)
     
  9. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    10:32 AM
    Mainline
    10.2
    After I enable this on HTTPS/Port 433.
    I got 100+ server error reported by Google Webmaster Tools (500,502, and 90% 503 errors)
    and some members reported some page display like this.

    upload_2017-8-18_19-32-3.png

    Is it related?
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    12:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Strange.. no idea as I am not seeing this on my HTTPS sites. Disable TCP Fast Open and see if your members see a fix ?
     
  11. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    10:32 AM
    Mainline
    10.2
    I disable all nginx modules I don't need anymore, then rebuilt Nginx.
    Except brotli and ngx_pagespeed.

    I'll observe for 1 day hope it will go down.
    If not then I'll remove this option.
     
  12. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    10:32 AM
    Mainline
    10.2
    I myself didn't receive this error though.
     
  13. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    10:32 AM
    Mainline
    10.2
    Haha my Bad.
    I migrated my forum from OVH Canada to OVH Singapore last Wednesday, I closed the Forum for 15 minutes to do the syncing of files and database.

    That explain why I got HTTP/1.1 503 errors :D.