GeoFenceAccessManager leaks HTTP clients

Description

The GeoFenceAccessManager uses a suclass of GetMapKvpParser to avoid duplicating the layer parsing code in GetMap requests. The GetMapKvpParser is meant to be a singleton, keeps a HTTP Client that is instantiated on creation, and destryed when Spring calls the destroy method.


The GeoFenceAccessManager subclass instead is created on a "as needed basis" (when authorizing requests) and does not call destroy, causing the clients to be created and then leaked at a high rate.

 

A note, this is a “finalizer queue” kind of leak, there are no persistent references, it’s just that with high request rate the finalizer cannot keep up with all these HTTP clients accumulating in it to run finalizers.

Environment

None

Assignee

Imran Rajjad

Reporter

Andrea Aime

Triage

None

Fix versions

Affects versions

None

Components

Priority

Medium
Configure