Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Memory bloat with PDO instrumentation #262

Open
asldevi opened this issue Sep 23, 2020 · 2 comments
Open

Memory bloat with PDO instrumentation #262

asldevi opened this issue Sep 23, 2020 · 2 comments

Comments

@asldevi
Copy link

asldevi commented Sep 23, 2020

we're observing a memory bloat with PDO's instrumentation handleStatementExecute method .

If I comment out the following line, which does the instumentation, memory bloat disappears.

opencensus_trace_method('PDOStatement', 'execute', [static::class, 'handleStatementExecute']);

Here's a profile info from blackfire for the same.
Screenshot 2020-09-23 at 9 58 59 AM

@asldevi asldevi changed the title Memory bloat in PDO Memory bloat with PDO instrumentation Sep 23, 2020
@MrMage
Copy link
Contributor

MrMage commented Jan 28, 2021

@asldevi are you still encountering this issue, or were you able to work around it?

@asldevi
Copy link
Author

asldevi commented Jan 29, 2021

@MrMage We've realized that this is not a PDO specific problem, but rather the lib holding spans until the request-response cycle is completed. This is causing memory bloats for requests having large number of spans.

We're working on a solution to export every N spans as they come in, and release the memory,
just like other Jaeger clients do. There are few intricacies, though. /cc @ShivamYuvraj

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants