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: "Kirill A. Korinskiy" <catap@xxxxxxxx>
- Subject: Re: [emerg] 6428#0: malloc() 3053187144 bytes failed (12: Cannot allocate memory)
- From: Eugene Batogov <johnbat26@xxxxxxxxx>
- Date: Fri, 25 Mar 2011 15:22:00 +0300
- Cc: nginx-ru@xxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=rtYaLyP7QHzXpwidxVINDKYhH2L62q5BHEcT7Bdkadc=; b=k6p4Fe8zau2VzUn/7Sn9W6u6vv5FFrf8uFRGIQ0OKVDKhimMq2xoqQ4mtkrD7EYkxf SyivGfghQuCuxfMZXVVqoNoGcx7ulNPZUs63mRVyfN0auf0nNZd/o9kg39L/E/HZxPJU auV53aTNodTkgpjEPa5BJY7h35WedzmVuUXB4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=L0VQpn5ywHItcERXpG//haWIFUaBOVhMF9LRpDRTyJP498SlSDNiMb6MBvprWkHmmk Pyfnx3XUjZSij11MLSOGrz7UxYj7dsC06PSY1QTT/8W49ZGQNOEAokGWd+Db2kIdbBK0 86J5Gtd5OEuxulZLMZTYvJ+O9Xlt8FGmsjjT0=
- In-reply-to: <AANLkTimFFdxbZhnhvJG=XK6F_2XRmz36g-c0HfoKVMtA@xxxxxxxxxxxxxx>
- References: <AANLkTikq6XN1HsmCeiEvknb75W9TYxACXWo73BiNUmVs@xxxxxxxxxxxxxx> <AANLkTimFFdxbZhnhvJG=XK6F_2XRmz36g-c0HfoKVMtA@xxxxxxxxxxxxxx>
Частично могу:
#######################################################################
# 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
|