dunglas / mercure

🪽 An open, easy, fast, reliable and battery-efficient solution for real-time communications
https://mercure.rocks
GNU Affero General Public License v3.0
3.83k stars 278 forks source link

Memory leak #899

Open denisUbiq opened 2 months ago

denisUbiq commented 2 months ago

Hi! We have a problem while using mercure and can't figure out what wrong... We are using mercure for the subscription API but the memory usage always go up an up but never down... here is a screenshot of the last 30 days.

Capture d’écran 2024-04-17 à 15 47 29

We are using the latest docker image through docker-compose.

I don't think it's normal that the memory usage going up like this... Or is it? How to fix this? is there is something to disable that we didn't?

Thanks a lot

dunglas commented 2 months ago

Are you using the BoltDB transport, (the default, which is kind of an in-memory DB)? If yes that's quite normal. Try to set a maximum size to the history (https://mercure.rocks/docs/hub/config#bolt-adapter) or to switch to the local transport to see if the problem persists.

denisUbiq commented 2 months ago

Yes we are using the default one. Ok I see! Thank you! We are still testing out Mercure, so still learning how it works ;)

We will try to set the max size first and keep you updated!

Thank you for your reactivity!