SUSE Support

Here When You Need Us

Large XML files exceed nodeset limits

This document (7023892) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12


While processing very large XML files the following error was observed:

XPath error : Memory allocation failed : growing nodeset hit limit

The following test results were noted:
SLES15 SP0 libxml2-2-2.9.7-3.6.1   - FAILED
SLES12 SP4 libxml2-2-2.9.4-46.15.1 - FAILED
SLES12 SP3 libxml2-2-2.9.4-46.15.1 - FAILED
SLES12 SP2 libxml2-2-2.9.4-46.12.1 - FAILED
SLES11 SP4 libxml2-2.7.6- - WORKED


A newer version of libxml2-2 is required that introduces a new environment variable LIBXML_MAX_NODESET_LENGTH that can be set to increase the nodeset limit.

Default Value: 10000000
Minimum Value: 1
Maximum Value: INT_MAX (Generally 2147483647, but this depends on the compiler)

If LIBXML_MAX_NODESET_LENGTH is less than 1 or greater than INT_MAX, the default value is used.

One possible use case is to define:
in a start up script before launching your application that requires a higher limit.

A PTF is available as needed from support.


A patch was introduced to hard code the XPATH_MAX_NODESET_LENGTH to avoid denial of service attacks. The patch was never back ported to SLES11 limiting the nodeset value.


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023892
  • Creation Date: 22-May-2019
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.