Skip to content

Memory Leak in History (and Active Flag does not to be working) #680

@marcushill

Description

@marcushill

My team has noticed a significant memory leak in version: [email protected]. We have a rather long running seneca action in which we make a large number (on the order of a few hundred thousand) calls to other seneca actions. Memory utilization would spike as expected, but the corresponding drop off after those results should have been freed from memory did not occur.

We took a number of heap dumps and it became clear that the Seneca History object contained the message (and response?) of every Seneca action we called. I believe this behavior is intended, but it doesn't ever clean up after itself over the course of the couple of hours that the job runs. I believe that this function has a bug in it that is causing prune not to delete messages as often as it should.

Also, setting history.active to false in the config does not fully disable history functionality:

{
   history: {
     active: false
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions