Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No memory limit of mosquitto client queue #2153

Open
gennartan opened this issue Mar 26, 2021 · 1 comment
Open

No memory limit of mosquitto client queue #2153

gennartan opened this issue Mar 26, 2021 · 1 comment

Comments

@gennartan
Copy link

Whenever a new message is being published from the client by mosquitto_publish() , it is appened to a linked list containing all the messages to be sent. But it is not being processed right after that. Mosquitto loop will check the message to be sent and send the necessary messages.

The problem is that there is no limit to the number of message that we can add in this linked list. If the number of incoming message is higher than the network abilities of the computer, the program will quickly run out of memory and be killed by the computer.

This problem does only occurs for mosquitto client, and not mosquitto broker. For the broker, there is this specific line of code that solves a lot of things:

#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && defined(__GLIBC__)
#define REAL_WITH_MEMORY_TRACKING
#endif
@CodyPannell
Copy link

Has there been any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants