jruizgit / rules

Durable Rules Engine
MIT License
1.13k stars 209 forks source link

Memory leak - thrashing by durable rules engine #137

Open prade opened 6 years ago

prade commented 6 years ago

Hi,

We have deployed durable rules as a stand alone server and used dynamic creation of rules, posting of events etc.

We are seeing high usage of storage by the rules engine in our deployed docker. Rules process has taken up to 50 GB of memory at one point in time.

Attached is the image showcasing the high virtual memory usage.

screenshot from 2018-01-04 16-56-02

Can you please suggest a fix for this ?

Thanks

jruizgit commented 6 years ago

Hi, thanks for reporting the issue. How many rulesets have you created? Do you see memory increasing only when registering new rulesets? or do you see it increasing also when reacting to events? Do you ever need to delete rulesets?

prade commented 6 years ago

Hi,

We currently have close to 100 rulesets. The memory seems to increase over time during both actions of registering rulesets as well as reacting to events as well. Yes we don't mind deleting rulesets, we haven't deleted any or checked for such functionality.

Is there a way were we could stop tracking events over time and limit the functionality to track single event request/response and use storage for a minimal time period ?

Thanks for your quick response, awaiting your reply.

aravindnc-olt commented 6 years ago

Do we have any update here ? I'm also having same question.

dishantgupta commented 3 years ago

I am facing the same issue, the memory is allocated at the time of Ruleset object creation in init with method: durable_rules_engine.create_ruleset and is not getting deallocated. @jruizgit I am not keeping a persistent or inpersistent ruleset store so a new ruleset is created with a UUID as name for each new event. This results in a gradual memory increase of app container and eventually crashes. How can I delete rulesets? Please help here.

email: dishantgupta1993@gmail.com

ruslanolkhovsky commented 2 years ago

We are facing with the same issue and app crash behaviour. @jruizgit Please, advise. Thank you.