NGINX and failed (12: Cannot allocate memory)

5,173

The problem was solved with deleting packet nginx-extras

Share:
5,173

Related videos on Youtube

kbu
Author by

kbu

Updated on September 18, 2022

Comments

  • kbu
    kbu almost 2 years

    could someone be so nice and explain me how to solve this problem?

    in log nginx print:

    2015/06/24 11:12:19 [alert] 2151#0: mmap(MAP_ANON|MAP_SHARED, 33554432) failed (12: Cannot allocate memory)
    

    nginx.conf

    user developer;
    worker_processes auto;
    pid /run/nginx.pid;
    
    events {
        use epoll;
        worker_connections 30;
        multi_accept on;
    }
    

    http {

        ##
        # Basic Settings
        ##
    
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        #keepalive_timeout 65;
        keepalive_timeout 2;
        types_hash_max_size 2048;
        server_tokens off;
    
        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
    
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
    
        ##
        # Logging Settings
        ##
    
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
    
        ##
        # Gzip Settings
        ##
    
        gzip on;
        gzip_disable "msie6";
        gzip_min_length  1000;
        gzip_buffers     16 8k;
    
        gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    
    
    
        # MY CHANGES
        ssl_session_cache   shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_prefer_server_ciphers on;
        ssl_stapling on;
        resolver 8.8.8.8;
        geoip_country  /srv/www/geoipdb/GeoIP.dat;
        geoip_city     /srv/www/geoipdb/GeoLiteCity.dat;
    
        # Support the X-Forwarded-Proto header for fastcgi.
        map $http_x_forwarded_proto $fastcgi_https {
                default $https;
                http '';
                https on;
        }
    
        variables_hash_max_size 1024; # default 512
        upload_progress uploads 1m;
    
        include /etc/nginx/conf.d/*.conf;
        include apps/drupal/map_cache.conf;
        include /etc/nginx/sites-enabled/*;
    

    }

    cat /etc/sysctl.conf

    kernel.shmmax = 68719476736
    kernel.shmall = 4294967296
    

    I have vps with 4G RAM. in plesk memmory tab i see:

    http://itmages.ru/image/view/2669317/4ab8f2d4

    Thx in advance!