KB Article #177560
Libxml warning - huge text node
Problem
When parsing XML with a single text node larger than 10MB, you see an exception like the following:
ERROR 01/Dec/2015:00:00:00.000 [0fffffff] libxml warning at line 1: xmlSAX2Characters: huge text node
Resolution
This is a DoS prevention mechanism built into libxml. If you trust the source of the XML and wish to parse very large messages, you can turn on the XML_PARSE_HUGE option to bypass this limit. In order to enable large XML processing support in libxml2 you must turn the option on in the /apigateway/system/conf/libxml.xml file like this:
<LibxmlFeature name="XML_PARSE_HUGE" value="1"/>
The gateways must be restarted for this configuration to take effect. By default, XML_PARSE_HUGE is turned off. When processing large files, note that the max byte limits are likely to need adjustment as well. It is a good idea to review KB 176703 and review your current limit settings whenever you hit this issue, otherwise that is very likely to be the next problem you encounter.