Join the community today
Register Now

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

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

  1. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    upload_2015-12-14_2-24-52.png
     
  2. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    Ahhhhh!
    This thing cause my /var/ partition almost full :/

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

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    Anyway to prevent this from happening again Eva?
    Limiting the size of that file.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    not a know centmin mod directory or file so no idea.. what's in it ?
     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    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. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    I have to create this cron to clear that file up every 30 minutes.
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    nope i have 90+ centmin mod servers, not one has that file
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    LoL :D
    Why is it I have that file then?
    and logging every Nginx error ?
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    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. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    Nah just VBSEO errors.
    99% of the error are related to that outdated buggy plugin :).
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    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 Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    4:13 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Nop, it is not "default" folder.
     
  15. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    10:13 PM
    latest
    10
    Nope. Not on any of mine either.
     
  16. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    It's not a folder on mine, but file.
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:13 AM
    1.11
    10.2
    There is a lot, I will just list all of them:
     
  19. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    12:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Informative Informative x 1