ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: [emerg] 6428#0: malloc() 3053187144 bytes failed (12: Cannot allocate memory)
  • From: Eugene Batogov <johnbat26@xxxxxxxxx>
  • Date: Fri, 25 Mar 2011 15:27:30 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:to:subject:from:date:mime-version:content-type :content-transfer-encoding:message-id; bh=rtYaLyP7QHzXpwidxVINDKYhH2L62q5BHEcT7Bdkadc=; b=p1oHzQ/2Im0ymNAuhvmW8Us1AgLGkO90nLgn8g6xEUiM1j2ltFZ39hUERRtE6u8WvG NYewq/qDACIRUqu7k7BD9LAmUchtF7KaphlOPmBhlr/vnMSGFpnK1TvlnT9u3AFe+X6i IJqp3JnU4nvfyZOxJABjh3iKpPkrl7zQE99N0=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:from:date:mime-version:content-type :content-transfer-encoding:message-id; b=WkYuSUYZk59kyO0imsTFGW9Gf5rYHjj0WJDfvqV3Ie3wXSn6bW7N6ft9QJhBv3PnXh ZjlW92BpXT8Csh+cjhN+0Q/Yxz2b7VM/bnpBXp2sjH9E+BIUc+zyIxkGuid0mQStP/kU +YXHwX9XUvHwNYy/yFfGUQ8nGXf/z31XCD7oA=

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


#######################################################################
# 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 mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.