Skip to content

WHATWG URL Memory Leak #19019

Closed
Closed
@aikar

Description

@aikar

I've been debugging this issue: sidorares/node-mysql2#726
I'm confident the leak is in native land, as my heap grew over the weekend from 21.8MB to 22.0MB, comparing Heap Snapshots with the Chrome Inspector, shows no signs of a leak.

However the RSS of my process grew 240MB (in the course of the weekend)

I've narrowed the issue down to being related to the URL parsing of the Database DSN, as when I did a core dump of my leaking process,
I found my hostnames at 1.3 million instances of the string, and thousands to hundreds of thousands of various chunks of my DSN.
mysql2 lib does url parsing like so:
https://github.com/sidorares/node-mysql2/blob/master/lib/connection_config.js#L167

Seems pretty standard to me.

edit: mysql2 notes not relevant, see below comments.

Related Issue: #17448

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoryIssues and PRs related to the memory management or memory footprint.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions