EightPointsGuzzleBundle icon indicating copy to clipboard operation
EightPointsGuzzleBundle copied to clipboard

Guzzle Logger is leaking in long running scripts

Open mkardakov opened this issue 3 years ago • 0 comments

Q A
Symfony version ^5.4
Bundle version v8.3.0

Hello, I faced an issue with a memory leak in a long-running script. I am using logging:true option in production to track HTTP requests in kibana later on. Once the option enabled the bundle starts logging requests and responses and collects them in a variable. https://github.com/8p/EightPointsGuzzleBundle/blob/master/src/Log/Logger.php#L66

The problem is that the logger never clears it and it causes a memory leak. As far as I understand It will clear the memory if the profiler is turned ON which is not the case for production https://github.com/8p/EightPointsGuzzleBundle/blob/84b0f13129f969cbe747015beba95637b71d8b14/src/DataCollector/HttpDataCollector.php#L65

Are there any solutions for this issue?

mkardakov avatar May 08 '23 13:05 mkardakov