eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.88k stars 2.36k forks source link

REAL_WITH_MEMORY_TRACKING is not enabled for musl. #2287

Open mazerun09 opened 3 years ago

mazerun09 commented 3 years ago

I am trying to use memory_limit option but seems because of REAL_WITH_MEMORY_TRACKING its not getting enabled and doesn't work. I am using musl libc for compilation. is there way I can enable for musl.

ralight commented 3 years ago

If you modify the header to force REAL_WITH_MEMORY_TRACKING to be defined, does it work ok on musl? From a quick search I would expect it to.

mazerun09 commented 3 years ago

Yes it does. in fact tested that. but that creates new problem that when I enable memory_limit, after amount of message being queued, mosquito is not increasing which is expected but after that client connection are being rejected with peer reset error. which causes problem with message dequeue.

Spinachboul commented 1 year ago

If you use the --with-memory-limit option instead of --with-real-memory-tracking. Another suggestion is to use a different "libc" implementation such as glibc.