I am having problems trying to display a Ordnance Survey MasterMap topgraphic area layer (source from MbTile) via a WMS request, whereby I hit a maximum memory error:
org.geoserver.platform.ServiceException: Rendering request would use 67713KB, whilst the maximum memory allowed is 65536KB
The layer uses a SLD stylesheet (supplied by the OS) and has many feature types defined. It is a very large polygon dataset, but will only display features below 1:4000. I have a similar layer for topographic lines which displays without issue.
I have searched the forum and other threads and the solution has been to increase the Max rendering memory (KB) size within the WMS settings in Geoserver from the default 65536KB. I have increased this to 512000KB plus I’ve increased the java web server (Jetty) buffer size to over 100000KB, but still get the error. Clearing the cache and restarting the server have not made any difference.
My GeoServer initialisation has:
JAVA_OPTS="-Xmx4096m -Xms1024m -XX:MaxPermSize=256m
The machine has plenty of memory and spare RAM. Could anyone please suggest other items to check as I’m out of ideas at the moment.
Thanks,
Jonny
Geoserver 2.26.2
Java version 11 64bit
Windows Server 2016
Memory 28672Mb
if (maxMemory > 0 && memory > maxMemory) {
long kbUsed = memory / KB;
long kbMax = maxMemory / KB;
throw new ServiceException(
"Rendering request would use "
+ kbUsed
+ "KB, whilst the "
+ "maximum memory allowed is "
+ kbMax
+ "KB",
ServiceException.MAX_MEMORY_EXCEEDED);
}
You say you have changed the Max Rendering Memory in the WMS Settings. Can you double check that please? There is a chance you have both the global WMS Settings and workspace WMS Settings to review…
Thank you for looking into this, it is much appreciated.
I wasn’t aware of the Workspace WMS Settings and had not seen it mentioned in the documentation or other threads regarding memory, once the Max Rendering Memory was increased from the default 65536KB value, the layer started displaying as expected. Thank you again for alerting me to this.
That’s wonderful to hear that you were helped so quickly. Would you consider helping others back, by making a quick fix to the documentation that you used and suggesting to others to check both the global WMS Settings and workspace WMS Settings.