Gabriel Roldan ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A54db8b09-1e64-436a-adac-248049585cee
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 ) / Improvement ( 
https://osgeo-org.atlassian.net/browse/GEOS-10559?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 ) GEOS-10559 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10559?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 ) Lazy initialization of GetMapKvpRequestReader's HTTP client used to fetch 
remote styles ( 
https://osgeo-org.atlassian.net/browse/GEOS-10559?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 )

Issue Type: Improvement Affects Versions: 2.21.0 Assignee: Gabriel Roldan ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A54db8b09-1e64-436a-adac-248049585cee
 ) Components: WMS Created: 23/Jun/22 8:33 PM Priority: Medium Reporter: 
Gabriel Roldan ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A54db8b09-1e64-436a-adac-248049585cee
 )

GetMapKvpRequestReader creates an apache CloseableHttpClient on its constructor.

To do so, it needs to get the stles cache configuration from the 
org.geoserver.wms.WMS facade.

Depending on the bootstrap conditions, this triggers eager initialization of 
beans, that can lead to a circular reference error. This issue is observed in 
GeoServer Cloud.

Also, the eager initialization of the HTTP client can result in a waste of 
resources, because it may never use it, and because there are subclasses that 
definitely won’t use it.

Some of these subclasses are not spring beans, but created on-demand, such as 
WMSRequests.LayerParser, which currently adds a CatalogListener on each 
invocation of WMSRequests.getGetMapParams(), that is never removed from the 
catalog, hence being a memory leak.

As a solution, the HTTP client used by GetMapKvpRequestReader shall be lazily 
initialized.

( 
https://osgeo-org.atlassian.net/browse/GEOS-10559#add-comment?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10559#add-comment?atlOrigin=eyJpIjoiMWY1OTNkZTc2OGY2NGM0MWI5NDIyMDBjMWNjZjExNjkiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100201- 
sha1:92d0e2d )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to