kuzzleio / kuzzle

Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
https://kuzzle.io
Apache License 2.0
1.44k stars 124 forks source link

Threaded plugins are restarted by PM2 when exceeding max memory limit #677

Closed scottinet closed 7 years ago

scottinet commented 7 years ago

How to reproduce: launch Kuzzle RC9 and watch how the kuzzle-plugin-logger plugin gets restarted after a few seconds because it takes more than 100MB of memory (edit: does not seem to be reproducable everytime, this needs investigations)

Fix proposal: raise the PM2's default max-memory-limit to a far higher value, and expose this parameter in Kuzzle configuration files. Or remove this limitation altogether.

Also, we have to investigate the logger plugin to check if it's normal for it to take so much memory space under certain conditions.

scottinet commented 7 years ago

Oops => https://github.com/kuzzleio/kuzzle/blob/master/lib/api/core/plugins/pluginsManager.js#L226

I'm changing this value and I will update the documentation to add this missing configuration option along with the killTimeout one.