Yes indeed, that's the area. GetLegendGraphic had no max memory limit
(unlike GetMap) and could be used to bring a GeoServer to OOM
by simply increasing the sample image size. Not any longer. I'm guessing
Michael has a very long and complex style there, that would generate
a very large GetLegendGraphic?

Regards,

Andrea Aime


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail


On Wed, Jun 26, 2024 at 8:30 AM Jody Garnett <jody.garn...@gmail.com> wrote:

> I was not aware there was a limit, checking the code for that exception
> shows it is thrown by something called Tally.java which calculates max
> memory based on the max memory set aside for WMS requests.
>
>
> https://github.com/geoserver/geoserver/blob/b3b3ca4985f8fba292dea910d9d3317e72b00edb/src/wms/src/main/java/org/geoserver/wms/legendgraphic/Tally.java#L26
>
>     public Tally(WMS wms) {
>         if (wms != null && wms.getMaxRequestMemory() > 0) {
>             this.maxMemory = wms.getMaxRequestMemory() * 1024L; // KB to
> bytes
>         } else {
>             this.maxMemory = UNLIMITED;
>         }
>     }
>
> Consider increasing the WMS  "Max rendering memory" and see if has an
> effected:
> https://docs.geoserver.org/stable/en/user/services/wms/webadmin.html
>
> (The WMS max memory setting should be documented as "Resource consumption
> limits" on that page but I do not see anything).
>
> --
> Jody Garnett
>
>
> On Jun 25, 2024 at 1:27:01 PM, Michael STEIGEMANN via Geoserver-users <
> geoserver-users@lists.sourceforge.net> wrote:
>
>> Hello,
>>
>>
>>
>> in my geoserver instance the generation of legend graphics does not work
>> anymore. I use the following URL:
>>
>> http://localhost:8080/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&height=12&width=12&layer=geodata%3Amylayer&style=&version=1.3.0&SLD_VERSION=1.1.0&LEGEND_OPTIONS=forceLabels%3Aon&SCALE=564&authkey=xxx
>>
>>
>> The errormessage is:
>>
>>
>>
>> <ServiceExceptionReport xmlns=http://www.opengis.net/ogc xmlns:xsi=
>> http://www.w3.org/2001/XMLSchema-instance
>>  version="1.3.0" xsi:schemaLocation=http://www.opengis.net/ogc
>> https://nbmssp8/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd?authkey=56f60c87-989c-4f71-b2bb-14d5c8cf20e3
>> <http://www.opengis.net/ogc%20https:/nbmssp8/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd?authkey=56f60c87-989c-4f71-b2bb-14d5c8cf20e3>
>> >
>>
>> <ServiceException code="MaxMemoryExceeded"> Max legend graphic memory
>> usage exceeded. </ServiceException>
>>
>> </ServiceExceptionReport>
>>
>>
>>
>> The WMS map rendering works as expected. The tomcat memory settings of
>> the tomcat are JvmMs=1024 and JvmMx=4096.
>>
>>
>>
>> Where can I change the setting?
>>
>>
>>
>> I am using GeoServer Release *2.24.1*. on windows.
>>
>>
>>
>> Thanks and all the best,
>>
>> Michael
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> If you want to request a feature or an improvement, also see this:
>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to