summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@novemberain.com>2015-10-01 10:45:33 +0800
committerMichael Klishin <michael@novemberain.com>2015-10-01 10:45:33 +0800
commitbd7cc49bc3fb418e783206d7015c3e327ed7a8f3 (patch)
treee3cc34f72a4d35af050f686bd2a3443a383a9e02
parentc5dc37f9bb70a2daf95e79cc5248fdc9bbe229fb (diff)
parentce514ace295baa88270a0dbfc075f106e966e2f8 (diff)
downloadrabbitmq-server-git-bd7cc49bc3fb418e783206d7015c3e327ed7a8f3.tar.gz
Merge pull request #329 from lshift/initial_frame_max
allow initial frame_max to be configured
-rw-r--r--docs/rabbitmq.config.example5
-rw-r--r--src/rabbit_reader.erl3
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/rabbitmq.config.example b/docs/rabbitmq.config.example
index dc0fd5d4a5..3047f8f70e 100644
--- a/docs/rabbitmq.config.example
+++ b/docs/rabbitmq.config.example
@@ -161,6 +161,11 @@
%%
%% {frame_max, 131072},
+ %% Set the max frame size the server will accept before connection
+ %% tuning occurs
+ %%
+ %% {initial_frame_max, 4096},
+
%% Set the max permissible number of channels per connection.
%% 0 means "no limit".
%%
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 58c5aef8fd..f66a80d811 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -336,6 +336,7 @@ start_connection(Parent, HelperSup, Deb, Sock, SockTransform) ->
exit(normal)
end,
{ok, HandshakeTimeout} = application:get_env(rabbit, handshake_timeout),
+ InitialFrameMax = application:get_env(rabbit, initial_frame_max, ?FRAME_MIN_SIZE),
ClientSock = socket_op(Sock, SockTransform),
erlang:send_after(HandshakeTimeout, self(), handshake_timeout),
{PeerHost, PeerPort, Host, Port} =
@@ -352,7 +353,7 @@ start_connection(Parent, HelperSup, Deb, Sock, SockTransform) ->
protocol = none,
user = none,
timeout_sec = (HandshakeTimeout / 1000),
- frame_max = ?FRAME_MIN_SIZE,
+ frame_max = InitialFrameMax,
vhost = none,
client_properties = none,
capabilities = [],