Welcome! Log In Create A New Profile

Advanced

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

March 25, 2011 08:24AM
Частично могу:


#######################################################################
# 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@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

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

JohnBat26 March 25, 2011 04:54AM

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

Kirill A. Korinskiy March 25, 2011 07:08AM

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

JohnBat26 March 25, 2011 08:24AM

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

JohnBat26 March 25, 2011 09:38AM

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

Maxim Dounin March 25, 2011 09:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 116
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready