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

OOM? #525

Open
ydddx opened this issue Dec 2, 2024 · 2 comments
Open

OOM? #525

ydddx opened this issue Dec 2, 2024 · 2 comments

Comments

@ydddx
Copy link

ydddx commented Dec 2, 2024

version : 1.4.1
code
image

When the MQTT service is offline, the memory grows without any limit until the application crashes. After the service comes back online, the increased memory is not released.

@ydddx
Copy link
Author

ydddx commented Dec 2, 2024

I found the issue. When the MQTTAsync_commands queue is full and old messages are deleted, the onFailure callback in the token is not executed, which causes the pendingDeliveryTokens_ to grow indefinitely and eventually lead to an out-of-memory (OOM) issue.

@ydddx
Copy link
Author

ydddx commented Dec 2, 2024

I added the following code, and it seems to be running well so far. However, I haven't read all the code, so I can't be sure if it introduces any additional issues.
image

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

1 participant