Skip to content

Memory leak on long running scripts #17

@buffcode

Description

@buffcode

Hi,

first of thanks for your library, it works quite well and encourages us to write small actions for our business logics, just as intended :)

We noticed, that the library has one inherent memory leak as the queue will never be cleaned.
As we use the library in a NodeJS service which usually won't restart, the queue will continuously grow and eventually hit the memory limit.

We fixed this for the time being by shifting the first element from the queue after emitting. This works in our use case but of cause will cause problems in use cases where consumers are defined later (aka repub). As such it would be nice to have the option to decide, whether or not a value should be put into the queue.

Do you have any plans into this direction or any other suggestions on how to handle this scenario?

Thanks in advance!
Laurens

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions