Skip to content

Conversation

draganpodvezanec-verox
Copy link

@draganpodvezanec-verox draganpodvezanec-verox commented Sep 3, 2025

closes #1309

Added a new global configuration section in geowebcache.xml:

<httpConnectionSettings>
  <maxConnectionsTotal>20</maxConnectionsTotal>
  <maxConnectionsPerRoute>6</maxConnectionsPerRoute>
  <connectionTimeout>30</connectionTimeout>
  <socketTimeout>60</socketTimeout>
</httpConnectionSettings>

Configuration Classes
HttpConnectionSettings: Configuration class for global HTTP connection settings
HttpClientConnectionManagerFactory: Factory class to manage connection managers with proper configuration

Schema Updates
Added httpConnectionSettings element to the XML schema
Updated documentation for the deprecated concurrency parameter
Added proper validation and documentation

Code Changes
HttpClientBuilder: Updated to use the connection manager factory instead of static singleton
XMLConfiguration: Added initialization of HTTP connection manager during startup
WMSLayer: Added deprecation warnings for the concurrency parameter
GeoWebCacheConfiguration: Added support for HTTP connection settings
Benefits
Proper Configuration: Connection settings are now properly applied and effective
Per-Route Control: Can configure maxConnectionsPerRoute for better performance
Global Settings: Single configuration point for all WMS layers
Backward Compatibility: Existing configurations continue to work with deprecation warnings
Performance: Better control over connection pooling for high-performance environments
Usage
For Side-by-Side GeoServer Installations
When GeoWebCache is installed side-by-side with GeoServer on localhost, increase the per-route connections:

<httpConnectionSettings>
  <maxConnectionsTotal>50</maxConnectionsTotal>
  <maxConnectionsPerRoute>10</maxConnectionsPerRoute>
  <connectionTimeout>30</connectionTimeout>
  <socketTimeout>60</socketTimeout>
</httpConnectionSettings>

Default Values
maxConnectionsTotal: 20
maxConnectionsPerRoute: 2
connectionTimeout: 30 seconds
socketTimeout: 60 seconds

Migration
Remove per-layer concurrency parameters from WMS layer configurations
Add global HTTP connection settings to geowebcache.xml
Monitor logs for deprecation warnings during migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A parameter "concurrency" from geowebcache.xml is never used as it is "designed" for..
1 participant