Merge branch 'stable'

This commit is contained in:
Michael Klishin 2017-10-20 21:26:30 +03:00
commit 08700282b7
No known key found for this signature in database
GPG Key ID: D1A1B77724CE35D5
3 changed files with 22 additions and 1 deletions

View File

@ -25,6 +25,7 @@ define PROJECT_ENV
%% breaks the QPid Java client
{frame_max, 131072},
{channel_max, 0},
{connection_max, infinity},
{heartbeat, 60},
{msg_store_file_size_limit, 16777216},
{fhc_write_buffering, true},

View File

@ -214,6 +214,25 @@
%%
%% {channel_max, 0},
%% Set the max permissible number of client connections to the node.
%% `infinity` means "no limit".
%%
%% This limit applies to client connections to all listeners (regardless of
%% the protocol, whether TLS is used and so on). CLI tools and inter-node
%% connections are exempt.
%%
%% When client connections are rapidly opened in succession, it is possible
%% for the total connection count to go slightly higher than the configured limit.
%% The limit works well as a general safety measure.
%%
%% Clients that are hitting the limit will see their TCP connections fail or time out.
%%
%% Introduced in 3.6.13.
%%
%% Related doc guide: http://www.rabbitmq.com/networking.html.
%%
%% {connection_max, infinity},
%% TCP socket options.
%%
%% Related doc guide: http://www.rabbitmq.com/networking.html.

View File

@ -49,10 +49,11 @@ start_link(IPAddress, Port, Transport, SocketOpts, ProtoSup, ProtoOpts, OnStartu
init({IPAddress, Port, Transport, SocketOpts, ProtoSup, ProtoOpts, OnStartup, OnShutdown,
ConcurrentAcceptorCount, Label}) ->
{ok, AckTimeout} = application:get_env(rabbit, ssl_handshake_timeout),
MaxConnections = rabbit_misc:get_env(rabbit, connection_max, infinity),
{ok, {{one_for_all, 10, 10}, [
ranch:child_spec({acceptor, IPAddress, Port}, ConcurrentAcceptorCount,
Transport, [{port, Port}, {ip, IPAddress},
{max_connections, infinity},
{max_connections, MaxConnections},
{ack_timeout, AckTimeout},
{connection_type, supervisor}|SocketOpts],
ProtoSup, ProtoOpts),