Hans Yperman ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=633adecda84c7f79c3888fef
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiZmU5Mzk4ODBmMDhkNDgxZjllNTUyYjBlYjg3ZjI3NWMiLCJwIjoiaiJ9
 ) / Improvement ( 
https://osgeo-org.atlassian.net/browse/GEOS-10856?atlOrigin=eyJpIjoiZmU5Mzk4ODBmMDhkNDgxZjllNTUyYjBlYjg3ZjI3NWMiLCJwIjoiaiJ9
 ) GEOS-10856 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10856?atlOrigin=eyJpIjoiZmU5Mzk4ODBmMDhkNDgxZjllNTUyYjBlYjg3ZjI3NWMiLCJwIjoiaiJ9
 ) geoserver monitor plugin - scaling troubles ( 
https://osgeo-org.atlassian.net/browse/GEOS-10856?atlOrigin=eyJpIjoiZmU5Mzk4ODBmMDhkNDgxZjllNTUyYjBlYjg3ZjI3NWMiLCJwIjoiaiJ9
 )

Issue Type: Improvement Affects Versions: 2.22.1 Assignee: Unassigned 
Components: Monitoring Created: 07/Feb/23 2:08 PM Environment:

When a request is done, it is sent to a post processor thread. We found this 
thread unable to keep up with incoming requests.

Specifically, ~100 reqs/second come in, but a failed DNS reverse lookup takes 
multiple seconds. After a day of runtime, I found ~300K PostProcessTask objects 
in the heap. This has multiple interesting consequences.

* Memory leaks, of course. As the PostProcessTask contains the 
HttpServletRequest / Reponse, and these are big objects, we quickly talk about 
multiple gigabytes.

2. After a HttpServletRequest/Response is serviced, tomcat will reuse some 
backing buffers for new requests. But as these objects are still held on by the 
post processor, fragments of unrelated requests can turn up in the post 
processing.

3. The post process executor service is hardcoded to 2 threads, which is simply 
not enough. This should be configurable.

4. ReverseDNSPostProcessor has a reverseLookupCache, but AFAIK it is only read, 
never written. Apart from that, it overlaps with the JDK cache and has no TTL. 
So it seems useless. I propose replacing it with a TTL-based cache, caching 
only the lookup FAILURES, as these are not cached by the JDK.

As a workaround, I configured it to not do reverse DNS lookups in 
monitoring.properties

Priority: Medium Reporter: Hans Yperman ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=633adecda84c7f79c3888fef
 )

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

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#100214- 
sha1:c33f0bb )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to