/
Systemd <=240 version defaults Max open files to 65535

Systemd <=240 version defaults Max open files to 65535


Observation

The hivemq.log shows statements like the following:

 

 

Consequence

The impact of this is severe.

From Wikipedia (https://en.wikipedia.org/wiki/File_descriptor )

In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.

The most immediate impact this will have for HiveMQ is that the broker cannot accept any additional connection, as there are not file descriptors for network sockets left.
This might also impact the ability to write log files or replicate data.

Cause

This is caused when HiveMQ is run as a service, using Systemd version 240 or lower.
Known issue: LimitNOFILE=ininity defaults to 65535 · Issue #6559 · systemd/systemd

Solution

Upgrade Systemd to version 241 or newer

or

Set LimitNOFILE in hivemq.service file to a specific value (i.e. 1000000)

Related content

Error starting Micronaut server: Unable to start Micronaut server on port: 443
Error starting Micronaut server: Unable to start Micronaut server on port: 443
Read with this
Get information about file descriptors used by system
Get information about file descriptors used by system
More like this
“Not Enough Disk Space” Warning in the HiveMQ Control Center
“Not Enough Disk Space” Warning in the HiveMQ Control Center
More like this
Recommendations: Heap and memory allocation for the HiveMQ process
Recommendations: Heap and memory allocation for the HiveMQ process
More like this