Skip to content

Sniffing in 2.2.2 causes memory leak & OOM #392

Closed
@spuzon

Description

@spuzon

Hi,
I run few instances of logstash, since upgrade to 2.2.2 i started to notice permanent crashes caused by OOM errors. Bigger heap only increase interval between OOMs. I checked heap dump and found excessive amount of org.apache.http.config.Registry objects.

Out of 3GB I had 887000 Registries taking 1.4GB of memory.
screen shot 2016-03-14 at 8 39 01 am

I started to monitory tenured memory utilization and amount of Registries object instances on the heap for each logstash instance.

Number of Registry objects 1GB heap (jmap -gchisto)

screen shot 2016-03-14 at 8 38 16 am

Tenured memory utilization 1GB heap (jstat -gcutil)
screen shot 2016-03-14 at 8 41 41 am

Drops from 85% to few percent indicate watchdog killed process as there was no point to waste CPU due to CMS cycles as memory won't be recycled.

You may notice one series of data on those screenshots that looks pretty fine, that's instance with sniffing set to false, all others had sniffing => true

Once disabled sniffing on all instances the problem is gone.

Disabled Sniffing: Number of Registry objects 1GB heap (jmap -gchisto)
screen shot 2016-03-14 at 8 54 32 am

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions