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

Exporting data can lead to instability and crashing the underlying OS due to memory starvation. #1892

Open
pulseuk-mh opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@pulseuk-mh
Copy link

What did I do

Used export data to save a large number of MQTT messages as JSON.

What happened

It appears MQTTX extracts all the messages out of the database file (.config/MQTTX/MQTTX.db) and constructs a large in memory document that is then saved to disk of the users choice via a file dialog. If there are a large number of messages the in memory document uses all available memory and leads to an unstable or unresponsive system or OS crash. The current version of MQTTX will crash a system with 32GB of RAM when exporting a large dataset.

Expected

Ask the user for the format of the export, the file location and then stream the contents of the database in the correct format to the file at a record/message level without using an egregious amount of memory.

Environment

  • OS: OS version, Linux 5.4.0-58-generic
  • MQTTX version, V1.11.0

More detail

More detail include log information or screenshot

@pulseuk-mh pulseuk-mh added the bug Something isn't working label Mar 11, 2025
@github-project-automation github-project-automation bot moved this to Backlog in MQTTX Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant