rabbitmq-website icon indicating copy to clipboard operation
rabbitmq-website copied to clipboard

Missing Context on tcp_listen_options: "exit_on_close"

Open kostakal opened this issue 3 years ago • 2 comments
trafficstars

Hello Team,

On the Website for RabbitMQ configuration, the tcp_listen_options setting is described as "Default socket options. You probably don't want to change this." Is there more context we can add for these settings?

image source: https://www.rabbitmq.com/configure.html

Is there a design reason behind those default values? I can understand that enabling linger and setting the timeout to 0 can avoid excessive amounts of sockets stuck in the TIME_WAIT state, and thus is a desirable setting for a server. However, for the exit_on_close flag, in erlang docs it states that the default value is true, while the default value in RabbitMQ is false. This setting could avoid an excessive amount of CLOSE_WAIT, which we found that in some cases, setting this flag to true actually helps with closing dead connections that are stuck. (Reference: https://groups.google.com/g/rabbitmq-users/c/MsTnhP9O5YM )

Would it be beneficial to update the docs with some more detailed explanation in why these settings are what they are? For example for exit_on_close:

Setting this to true means RabbitMQ will automatically close the socket when
the client disconnects. One-way TCP connections will no longer be supported.

Note: AMQP 0.9 protocol does not support one-way TCP connections. Setting this
option to true will not impact clients.

kostakal avatar May 19 '22 17:05 kostakal

You are welcome to contribute doc changes. We try to avoid overly "inside baseball" explanation, in particular for defaults. Instead we can document what the effects of changing this flag would be.

These defaults have been around for over a decade, and changing them will require a wide consensus on the core team.

michaelklishin avatar May 19 '22 18:05 michaelklishin

Sure, I will look to create a PR, thanks

kostakal avatar May 21 '22 00:05 kostakal

Fixed by #1416

lukebakken avatar Oct 17 '22 13:10 lukebakken