[emerg] 6428#0: malloc() 3053187144 bytes failed (12: Cannot allocate memory)

Eugene Batogov johnbat26 на gmail.com
Пт Мар 25 15:27:30 MSK 2011


Частично могу:


#######################################################################
# GLOBAL PARAMETERS
#######################################################################
user  root;
worker_processes  8;
timer_resolution 100ms;
worker_rlimit_nofile 1000000;
worker_priority -5;

error_log         /var/log/nginx/error.log  crit; 
pid               /var/run/nginx.pid;

events {
    worker_connections  1000;
    use epoll;
}

#######################################################################
# HTTP PARAMETERS
#######################################################################
http {
    include       mime.types;
    default_type  application/x-javascript;

    log_format main '$remote_addr - $remote_user [$time_local] $request '
    '"$status" $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    access_log off;
    client_header_buffer_size    1k;
    large_client_header_buffers  4 4k;

    gzip on;
    gzip_min_length 1100;
    gzip_buffers 64 8k;
    gzip_comp_level 3;
    gzip_http_version 1.1;
    gzip_proxied any;
    gzip_types text/plain application/xml application/x-javascript text/css;

    output_buffers   32 512k;
    sendfile_max_chunk  128k;
    postpone_output  1460;
    server_names_hash_bucket_size 64;
    client_max_body_size 15m;

    sendfile         on;
    tcp_nopush       on;
    tcp_nodelay      on;

    #timeouts
    keepalive_timeout   60 60;
    client_header_timeout  1m;
    client_body_timeout    1m;
    send_timeout           1m;
    reset_timedout_connection on;
    #timeouts end

    #limitation connetion from single IP
    #limit_zone   one  $binary_remote_addr  10m;
    #limit_conn   one  8;

 #######################################################################
# SERVER PARAMETERS
#######################################################################
    server {
        listen       80;
        server_name_in_redirect on;
        server_name  172.20.0.4;   # INSERT CORRECT IP !!!
        client_max_body_size       10m;
        client_body_buffer_size    128k;
        proxy_connect_timeout      90;
        proxy_send_timeout         90;
        proxy_read_timeout         90;
        proxy_buffer_size          4k;
        proxy_buffers              4 32k;
        proxy_busy_buffers_size    64k;
        proxy_temp_file_write_size 10m;
        proxy_set_header  Host        $host;
        proxy_set_header  X-Real-IP  $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        #access_log  /var/log/nginx/nginx.log  main;
        access_log  off;
        log_not_found off;
        root /var/spool/nginx/;
....
 далее locations

    # internal publish endpoint (keep it private / protected)
   location  /myapp/pub {
         set $push_channel_id $arg_id;      #/?id=239aff3 or somesuch
         push_publisher;

         push_store_messages off;            # enable message queueing
         push_message_timeout 2h;           # expire buffered messages after 2 hours
         push_max_message_buffer_length 10; # store 10 messages
       # push_min_message_recipients 0;     # minimum recipients before purge
        }


      # public long-polling endpoint
        location  /myapp/sub {
         set $push_channel_id $arg_id;
         push_subscriber;

         #The length of time a subscriber's long-polling connection can last before
         #it's timed out. If you don't want subscriber's connection to timeout, set
         #this to 0. Applicable only if a push_subscriber is present in this or a
         #child context. 
         push_subscriber_timeout 600; # 10 minutes

         #The length of time a channel will be removed after it has no subscriber and
         #no queued messages. If you want to remove a channel as soon as possible,
         #set this to 0. Applicable only if a push_publisher or push_subscriber is
         #present in this or a child context and push_subscriber_timeout is greater
         #than 0. This value should be greater than push_subscriber_timeout to make sense.
         push_channel_timeout 600; # 10 minutes

         # how multiple listener requests to the same channel id are handled
         # - last: only the most recent listener request is kept, 409 for others.
         # - first: only the oldest listener request is kept, 409 for others.
         # - broadcast: any number of listener requests may be long-polling.
         push_subscriber_concurrency last;
         #push_authorized_channels_only on;
         #push_max_channel_subscribers 1;
         
         default_type   application/x-javascript;
        }

...


В сообщении от 25 марта 2011 14:06:24 автор Kirill A. Korinskiy написал:
> А можете показать конфиг?
> 
>
-- 
Best Regards, Eugene Batogov



Подробная информация о списке рассылки nginx-ru