rabbitmq / rabbitmq-stomp

RabbitMQ STOMP plugin
https://www.rabbitmq.com/stomp.html
Other
49 stars 28 forks source link

Enable tcp_listen_options.keepalive for STOMP plugin #124

Closed merit-itops closed 5 years ago

merit-itops commented 6 years ago

Environment:

Issue: We've noticed that in some cases, even using STOMP 1.1 with heartbeats enabled, connections may sometimes linger in an phantom state. In this state, the connection is no longer listed in the "Connections" tab of the RabbitMQ web interface, but is still visible to the underlying operating system with netstat.

These connections continue to consume memory resources of beam.smp and cause the "Binaries" memory meter to grow. Enabling the "rabbitmq_top" plugin, we don't see this memory usage accounted for in any of the processes or ETS tables. Performing a stop/start of the broker to force the phantom connections to be purged results in memory usage returning to expected values.

Request: Please enable the ability to configure TCP Keepalives (such as can be configured for AMQP using tcp_listen_options.keepalive = true) for the STOMP plugin to allow the OS to reap these phantom connections. They currently grow at a very slow pace, but it does force us to restart a broker out of each cluster once every few months.

michaelklishin commented 5 years ago

Superseded by #129.