Incompatibility between embedded GWC and standalone GWC

Description

The settings for GEOWEBCACHE_CACHE_DIR and GEOWEBCACHE_CACHE_CONFIG will conflict when provided as environmental variables or system properties to the Tomcat 7.

In this case both the embedded and standalone geowebcache implementations (running in the same tomcat) will be configured with the same cache and/or config directories.

Environment

tomcat 8

Activity

Show:
Jody Garnett
July 26, 2016, 5:19 PM
Edited

The quick workaround is to remove the environment variable and/or system property solution is to advise users to change these settings in the GeoServer web.xml for geoserver, and the GeoWebCache web.xml for geowebcache.

Andrea Aime
July 26, 2016, 5:35 PM

And the incompatibility would be?

Kevin Smith [Administrator]
July 26, 2016, 7:22 PM

If both GeoServer with embeded GWC and stand alone GeoWebCache are installed in the same application server, then system properties/environment variables can't be used to set locations for storage without affecting both web apps, leading to them using the same cache and config dir, which leads to weirdness. At the absolute least we should document this letting users know that if they have both installed, they need to use context parameters. Providing a better way to do this via system properties/env vars would be helpful for people on app servers like tomcat that make context parameters inconvenient.

Andrea Aime
July 28, 2016, 6:34 AM

Deploying two JAI/ImageIO based applications in the same container is always problematic (just a warning, when you solve that problem others might pop up). As a rule of thumb, we never deploy anything else on a VM that's running GeoServer. Also, you basically force the two to be shut down and restarted at the same time, since GeoServer does not undeploy cleanly and leaks permgen (tried to fix it, failed, now there is no fixed permgen anymore, but the memory won't be released anyways) so the only clean restart is a full container restart.

Kevin Smith [Administrator]
January 26, 2017, 9:42 PM

Documentation was updated in 2.9.0-beta.

Fixed

Assignee

Kevin Smith [Administrator]

Reporter

Jody Garnett

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure