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

Problem feedback #966

Open
it16888 opened this issue Aug 5, 2024 · 6 comments
Open

Problem feedback #966

it16888 opened this issue Aug 5, 2024 · 6 comments
Labels

Comments

@it16888
Copy link

it16888 commented Aug 5, 2024

I deployed a simple gateway service using aedes 0.51.2, with no additional logic. I simply started a gateway on port 1883, and currently have around 250,000 connections.However, I found that when the number of MQTT connections is stable, the server memory will continue to grow, from 700M to 900M starting from 1, and even continue to grow.Has anyone encountered a similar problem?

image

image

image

@it16888 it16888 added the bug label Aug 5, 2024
@robertsLando
Copy link
Member

@it16888 What persistence/mqemnitter are you using?

@it16888
Copy link
Author

it16888 commented Aug 5, 2024

@it16888 What persistence/mqemnitter are you using?
I did not specifically specify persistence/mqemnitter, here is my code. I don't know where the problem lies

const {createBroker} = require('aedes')
const id = String(process.pid)
const broker = createBroker({id})
const server = require('net').createServer(broker.handle)
server.listen(port, () => {
console.log('server started and listening on port 1883')
})

@robertsLando
Copy link
Member

@it16888 if using aedes with clusters you should use redis/mongodb persistence and emitters

@it16888
Copy link
Author

it16888 commented Aug 5, 2024

@it16888 if using aedes with clusters you should use redis/mongodb persistence and emitters

Dear, I am not currently working on a cluster and do not use Redis or MongoDB. I just need to keep the client connected and can obtain the corresponding message by listening for events (client '|'clientRead' |'clientDisconnect '|'ckeepaliveTimeout | ping). What do I need to do? I also need to avoid the problem of memory getting bigger and bigger

@robertsLando
Copy link
Member

Clusters will not work as you expect without those storages: https://github.com/moscajs/aedes#clusters

@it16888
Copy link
Author

it16888 commented Aug 6, 2024

Clusters will not work as you expect without those storages: https://github.com/moscajs/aedes#clusters

Dear, I followed your advice and used aedes persistence moddb+mqemitter moddb. I use 20000 clients and send 20000 messages to the server per second. I see that the memory is still constantly increasing.

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

No branches or pull requests

2 participants