RabbitMQ Heartbeat Configuration Not Working (Broker Side)

202 views
Skip to first unread message

Rajdeep Mandal

unread,
Jul 24, 2020, 3:27:45 PM7/24/20
to rabbitmq-users
Hello all, I have an issue with configuration of RabbitMQ Broker. I want the effective heartbeat times to be significantly high. However, I’m not able to get it above 60 seconds.I need to get the server hearbeat to be more than the client hearbeat. Here is my sample configuration. Does anyone have any suggestions around this?

rabbitmq.config 
hearbeat = 500

AMQP/MQTT Client 
keepalive = 180

sysctl
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200

Yet all the clients are resetting every 60s, irrespective of what value I put in the hearbeat.

Luke Bakken

unread,
Jul 25, 2020, 9:40:29 AM7/25/20
to rabbitmq-users
Hello,

Please let us know what version of RabbitMQ and Erlang you are using. Attach all of your complete configuration files to your response. Providing snippets does not help us help you.

Provide the code you are using to test the negotiated heartbeat values. A simple MQTT client would suffice.

Finally, the sysctl values do not have an effect on the negotiated heartbeat.

Thanks,
Luke
Message has been deleted
Message has been deleted

Rajdeep Mandal

unread,
Jul 25, 2020, 11:20:05 AM7/25/20
to rabbitmq-users
Hi Luke,

Thanks for your response. I have attached a simple JS client (Client.txt) and the config file (rabbitmq.config). I have also attached the output of rabbitmqctl environment command (environment.json)

The versions are as below.

RabbitMQ version: 3.8.4 (I have also tried 3.8.5)
Erlang version: Erlang/OTP 23.0.2

Kindly let me know if I am missing out on something, or if you require additional information.

regards,
Rajdeep
rabbitmq.config
Client.txt
environment.json

Luke Bakken

unread,
Jul 27, 2020, 12:44:06 PM7/27/20
to rabbitmq-users
Hi Rajdeep,

Your configuration file is named rabbitmq.config, but the correct name for the ini-style configuration file is rabbitmq.conf

My guess is your configuration is not being read correctly. Could you please attach your RabbitMQ log file?

Thanks,
Luke

Rajdeep Mandal

unread,
Jul 28, 2020, 1:18:31 AM7/28/20
to rabbitmq-users
Hi,

I just mistakenly renamed it while attaching the file here, otherwise it is was correct in my implementation.

However, I was able to solve the issue and there was nothing wrong with the RabbitMQ configuration after all. I was using an Amazon Classic Load Balancer to load balance my RabbitMQ instances, and it had a default configuration there, Idle Connection Timeout, which was set at 60s. It was that tuning which was affecting the behaviour of our MQTT clients. 

Thank you so much for your support though! :-)

regards,
Rajdeep
Reply all
Reply to author
Forward
0 new messages