-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
out of memory error in syslogs #2968
Comments
Does any of your clients send large or many small persistent messages? (see how big the database of persistence messages is, on a Debian system it will probably be in /var/lib/mosquitto/, i.e. it should be enough to check the size using the command |
Thanks for the reply. Yes. All our clients sends small messages very frequently. unfortunately I'm not able to see the file in my system . File is not created.
do i need to specify db location in my conf file to create? Looks like we are not storing anything in the db. |
By default, Debian uses the configuration in /etc/mosquitto/mosquitto.conf, where the path to the persistent database is specified:
In your case, you do not use the default location for persistence, but this does not mean that mosquito does not have to keep persistent messages in memory. You can try to connect to your server, and try to read all the data that is stored persistently in memory, for example like this (use your IP number and your login data):
This can list a huge amount of data uploaded by clients who use the "retain" flag when publishing. Another possibility is that clients use qos1 and 2 when subscribing and publishing, and thus also require, under certain conditions, that the server allocates a large amount of memory for them. Depending on what you want to enable/disable for your clients, consider adding some of the options to the configuration (Read their specification in the mosquitto.conf manual page)(Read their specification in the mosquitto.conf manual page): max_packet_size |
Thanks for your prompt response. I will give a try and let you know. Thanks again. |
You might as well monitor the number of messages and bytes using subscriptions on the Mosquitto broker $SYS topics regarding message store So starting a mosquitto_sub should periodically give you information about messages being queued in the broker: (see https://mosquitto.org/man/mosquitto-8.html, Section Broker Status) |
Hi All
I'm using 2.0.15
We are currently facing an issue where our system, supporting 100 clients, experiences a crash after a few hours of operation, with Mosquitto going down due to an out-of-memory error. We are uncertain about the root cause and are seeking guidance on how to initiate the debugging process. Your insights would be highly appreciated. Could you please examine the syslogs for further analysis?
The text was updated successfully, but these errors were encountered: