Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx How come my /usr/local/nginx/ has 99GB total?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Dec 14, 2015.

  1. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    upload_2015-12-14_2-24-52.png

     
  2. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    Ahhhhh!
    This thing cause my /var/ partition almost full :/

    /usr/local/nginx/off
    which is 105GB.
     
  3. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    Anyway to prevent this from happening again Eva?
    Limiting the size of that file.
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    not a know centmin mod directory or file so no idea.. what's in it ?
     
  5. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    It is known I think, I have that file on every Centmin server I have.
    And it's logging every Nginx error on that file.
    Maybe because I have error log set to off on every domain vhost?
     
  6. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    I have to create this cron to clear that file up every 30 minutes.
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nope i have 90+ centmin mod servers, not one has that file
     
  8. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    LoL :D
    Why is it I have that file then?
    and logging every Nginx error ?
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    too much self tweaking hehe.. should try to keep close to settings that are out of box for some stuff = less problems ;)

    also if there's error logs, then you have problems more important than file size, you need to fix those errors :)
     
  10. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    Hahah Maybe LOL.

    Maybe something to do with my nginx.conf ?
    Code:
    user nginx nginx;
    worker_processes auto;
    worker_priority -10;
    
    worker_rlimit_nofile 260000;
    timer_resolution 100ms;
    pcre_jit on;
    pid logs/nginx.pid;
    
    events {
        worker_connections 8192;
        accept_mutex off;
        use epoll;
        multi_accept on;
    }
    
    http {
    
    ##################################
    ### Limit PHP Connection & Request
    limit_req_zone $binary_remote_addr zone=limitphpreq:16m rate=10r/s;
    limit_conn_zone $binary_remote_addr zone=limitphpcon:16m;
    ##################################
    
    ##################################
    ##### Only allow Cloudflare
    allow 127.0.0.1;
    allow 50.17.254.140;
    allow 103.21.244.0/22;
    allow 103.22.200.0/22;
    allow 103.31.4.0/22;
    allow 104.16.0.0/12;
    allow 108.162.192.0/18;
    allow 141.101.64.0/18;
    allow 162.158.0.0/15;
    allow 172.64.0.0/13;
    allow 173.245.48.0/20;
    allow 188.114.96.0/20;
    allow 190.93.240.0/20;
    allow 197.234.240.0/22;
    allow 198.41.128.0/17;
    allow 199.27.128.0/21;
    deny all;
    ##################################
    
    #more_set_headers "Server: nginx";
    #include /usr/local/nginx/conf/vts_http.conf;
    ###include /usr/local/nginx/conf/geoip.conf;
    #include /usr/local/nginx/conf/pagespeedadmin.conf;
    include /usr/local/nginx/conf/fastcgi_param_https_map.conf;
    
    log_format      main    '$remote_addr - $remote_user [$time_local] $request '
                    '"$status" $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                    ' "$connection" "$connection_requests" "$request_time"';
    
    access_log off;
    error_log logs/error.log warn;
    
    index index.php index.html index.htm;
    include mime.types;
    default_type  application/octet-stream;
    charset utf-8;
    
    # Update charset_types due to updated mime.types
    charset_types text/xml text/plain text/vnd.wap.wml application/x-javascript application/rss+xml text/css application/javascript application/json;
    
    sendfile on;
    sendfile_max_chunk 512k;
    tcp_nopush  on;
    tcp_nodelay on;
    server_tokens off;
    server_name_in_redirect off;
          
    keepalive_timeout  20;
    keepalive_requests 1000;
    lingering_time 20s;
    lingering_timeout 5s;
    keepalive_disable msie6;
    
    gzip on;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.";
    gzip_static on;
    gzip_min_length   1400;
    gzip_buffers 32 8k;
    gzip_http_version 1.0;
    gzip_comp_level 5;
    gzip_proxied any;
    gzip_types text/plain text/css text/xml application/javascript application/x-javascript application/xml application/xml+rss application/ecmascript application/json image/svg+xml;
    
    
    client_body_buffer_size 256k;
    client_body_in_file_only off;
    client_body_timeout 8s;
    client_header_buffer_size 64k;
    client_header_timeout 8s;
    client_max_body_size 20m;
    connection_pool_size  512;
    directio  4m;
    ignore_invalid_headers on;     
    large_client_header_buffers 8 64k;
    output_buffers 8 256k;
    postpone_output 1460;
    proxy_temp_path /tmp/nginx_proxy/;
    request_pool_size 32k;
    reset_timedout_connection on;
    send_timeout 15s;
    types_hash_max_size 2048;
    server_names_hash_bucket_size 64;
    
    open_file_cache max=50000 inactive=60s;
    open_file_cache_valid 120s;
    open_file_cache_min_uses 2;
    open_file_cache_errors off;
    open_log_file_cache max=10000 inactive=30s min_uses=2;
    
    include /usr/local/nginx/conf/conf.d/*.conf;
    
    }
    
     
  11. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    Nah just VBSEO errors.
    99% of the error are related to that outdated buggy plugin :).
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nginx.conf looks fine, so you're on your own to figure it out

    still fixing the actual errors is the real way to resolve this
     
  13. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    If I will downgrade to PHP 5.3, yes it will solve all those errors I think.
    But I can't risk the performance I'm having now with PHP 5.5.
     
  14. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    7:40 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Nop, it is not "default" folder.
     
  15. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    1:40 AM
    latest
    10
    Nope. Not on any of mine either.
     
  16. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    It's not a folder on mine, but file.
     
  17. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    quick check if there's any reference in any nginx conf file to the word = off
    Code:
    grep -Rn off /usr/local/nginx/conf/*
     
  18. rdan

    rdan Well-Known Member

    5,450
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    1:40 PM
    Mainline
    10.2
    There is a lot, I will just list all of them:
     
  19. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh i think i know what you did

    did you set
    Code:
    error_log off;
    there is no such option for off, so what you did is tell nginx to log errors to a file named off which is relative to your nginx install directory at /usr/local/nginx

    see Core functionality
    again, comes back to dealing with the actual error messages as the proper solution