I am using mosquitto as a broker to exchange data between clients using the MQTT protocol. But recently I have the following phenomenon.
My mosquitto sometimes connects very hard and sends it too. After checking everything, mosquitto is still running normally, CPU and memory don't spike. However, when checking with netstat
, I see FIN_WAIT1 queue with up to 2000 connections. And that caused the MQTT connection to be affected and I specifically checked there was no sign of being attacked from a specific IP, each connection in it was from a different IP, I think that is when my client disconnect. Because FIN_WAIT1 appears when the client sends a packet to the server to disconnect.
Is it because of the buffer overflow of TCP port ?
My client volume is always around 10000. My configuration is 4 core / 4gb RAM.