TCP Connection Established metric and memory issue using MQTT

75 views
Skip to first unread message

henry

unread,
Apr 3, 2021, 9:16:05 PM4/3/21
to rabbitmq-users
Hello.

There is something to be said about the memory, tcp established metrics that arise while using MQTT.

I am using rabbitmq 3.8.14 installed on ubuntu16 version in a single vmware.
I am using mqtt, management plugin and follow the default settings.
I am not using it as a cluster.

An average of 1400 IoT devices are communicating based on mqtt
Each network is an internal network, but the device's IP is different.

There are two problems we are currently facing.

1. Increasing issue of tcp established
Currently, tcp established is constantly increasing.
Currently mqtt ttl is the default setting (24h)
Checking with netstat or management tends to increase by about 100 per day.
(attached a file : check file description)

Currently, it is assumed that the connection with a specific IoT device has been esatablished, and the connection has increased because the client (iot device) did not give a FIN.

2. Continuous memory increase issue
Attach the results of the current rabbitmq-diagnostics.
In the case of allocated_unsued, there is a trend of steadily increasing, which is
Could it be possible to cause problems with memory management in the future?

Can someone with similar experience related to me give you advice?

Thank you for helping us use excellent open source.
스크린샷 2021-04-04 오전 9.30.00.png
스크린샷 2021-04-04 오전 9.11.47.png

M K

unread,
Apr 6, 2021, 5:45:22 AM4/6/21
to rabbitmq-users
One of your applications leaks connections [1][2]. Every connection uses a certain amount of memory
and if they are leaked, not only the memory usage of a node will constantly go up, so will the problem of memory fragmentation,
which is what a growing "allocated but not used" subsection usually indicates.

henry

unread,
Apr 12, 2021, 9:11:06 AM4/12/21
to rabbitmq-users
Thank you for your reply.

The network was temporarily disconnected because it was a wireless network(I guess). 
This problem was solved through mqtt keepalive setting.


mqtt.tcp_listen_options.keepalive = true
mqtt.tcp_listen_options.nodelay   = true

mqtt.tcp_listen_options.exit_on_close = true
mqtt.tcp_listen_options.send_timeout  = 120

2021년 4월 6일 화요일 오후 6시 45분 22초 UTC+9에 michael....@gmail.com님이 작성:
Reply all
Reply to author
Forward
0 new messages