moleculer-go / moleculer

🚀 Progressive microservices framework for Go - based and compatible with https://github.com/moleculerjs/moleculer
MIT License
143 stars 26 forks source link

Memory leak in ActionCatalog.Add() #104

Open jdeisenh opened 1 month ago

jdeisenh commented 1 month ago

Describe the bug After running for two days, our project using moleculer-go crashes with an OOM error

To Reproduce Any setup with some Actions published should show this problem under profiling

Expected behavior Memory usage limited over time

Additional context Profiled to be leaking in ActionCatalog) Add, append() Logging shows the ActionEntry List grows with every ActionCatalog update An attempted fix exist which will replace entries instead of just adding them, which seems to work.

jdeisenh commented 1 month ago

Same thing in EventCatalog().Add(). List keeps growing