[
https://issues.apache.org/jira/browse/XERCESJ-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605519#comment-17605519
]
Michael Glavassevich edited comment on XERCESJ-1751 at 9/15/22 8:26 PM:
------------------------------------------------------------------------
There were some improvements made for special cases, but in general large
maxOccurs can cause an OOM and is a known limitation, tracked by this JIRA
issue: https://issues.apache.org/jira/browse/XERCESJ-1227. Your choices to work
around this are to use maxOccurs="unbounded" or use the JAXP secure processing
feature / Xerces SecurityManager to block XML Schemas that would result in an
OOM. Using the assertion feature from XML Schema 1.1 may also perform better.
was (Author: [email protected]):
There were some improvements made for special cases, but in general large
maxOccurs can cause an OOM and is a known limitation, tracked by this issue in
JIRA issue: https://issues.apache.org/jira/browse/XERCESJ-1227. Your choices to
work around this are to use maxOccurs="unbounded" or use the JAXP secure
processing feature / Xerces SecurityManager to block XML Schemas that would
result in an OOM. Using the assertion feature from XML Schema 1.1 may also
perform better.
> Changing maxOccurs=unbounded to some finite number throws OOM in JVM
> --------------------------------------------------------------------
>
> Key: XERCESJ-1751
> URL: https://issues.apache.org/jira/browse/XERCESJ-1751
> Project: Xerces2-J
> Issue Type: Bug
> Affects Versions: 2.12.2
> Environment: Linux
> Reporter: Partha Pratim Paul
> Priority: Major
>
> Changing maxOccurs=unbounded to some finite number throws OOM in JVM. The
> finite number we have used is from 1000 to 5500 but the creates a memory
> starvation or resource exhaustion in all JVMs processing XMLs.
> The ask to let us know if -
> # Is there any boundary value that we can use for maxOccurs in our schema to
> overcome this issue?
> # Is there any fix available in the latest Xerces versions that we can
> upgrade to and that does not create this OOM exception? Our current version
> is 2.12.2
> # Is there any setting in the JVM (like Heap/Memory) that you recommend for
> us to use? The current heap size is 6GB for our JVMs
> # Is there any attribute that can be added to the schema to fix this issue
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]