roadrunner-bundle icon indicating copy to clipboard operation
roadrunner-bundle copied to clipboard

[FEATURE REQUEST] gc_collect_cycles()

Open WagnerPMC opened this issue 2 years ago • 1 comments

Hello there!

Since we have long-lived queries, I suggest adding an additional configuration of collect_cycles_every. Its value will indicate how many times in how many queries the function gc_collect_cycles() should be called for the current worker.

That is, if we specify a value of 10, then this function will run every 10 requests.

I think you'll support me.

WagnerPMC avatar Apr 02 '22 15:04 WagnerPMC

Hello!

Thank you for opening this :)

Are you seeing performance issue without forcing the garbage collector? Or gains by using gc_collect_cycles()?

Running gc_collect_cycles() after x requests is very easy to achieve with a middleware or a event listener on 'kernel.terminate'.

So if you have a reproducer showing that a Symfony project (with a dumb controller) is performing better with gc_collect_cycles(), I may be willing to add this feature.

Baldinof avatar Apr 04 '22 08:04 Baldinof