fractal
fractal copied to clipboard
Fixing memory leaks when fractal used in daemons
Due to every transformer being filled with the current scope, there is a reference recursion.
Transformer -> Scope -> Resource -> Transformer -> Scope...
This causes memory leaks in daemons and workers, I guess because GC is not able to collect these cyclomatic references; even running gc_collect_cycles
after each job is not helping.
I think this is not breaking change, but kind of messy. Begging for comments and help with this issue
Hello. I also need to run fractal in long-lived applications. My opinion is that the transformer should be immutable and the method setCurrentScope
should be removed.
Hey @AtCliffUnderline look at my solution of this issue. I hope it will help you to avoid memory leaks
https://github.com/thephpleague/fractal/pull/569