Issue Feature Closed

#95021Handle "XML could not be parsed: Line ...: No memory" during import in EXT:impexp

Alexander Nitsche 08/28/21, 08:40 updated 05/09/22, 19:14

Description

TYPO3 may hit memory limits when converting XML to PHP arrays, even before all PHP memory is consumed. This is probably due to a specific limit of 10 MB in libxml, which was introduced with libxml v2.7.0. This limit could be impractical when importing large XML files via EXT:impexp.

One solution could be to turn off the libxml limit, but this is only supported for the DOMDocument and simplexml_* implementations of libxml, but not for the current XmlParser implementation (a.k.a. xml_parser_*() functions):
https://stackoverflow.com/questions/5428055/xml-parse-huge-on-function-simplexml-load-string

Another approach could be to read and parse the XML file in blocks, as suggested in this stackoverflow thread:
https://stackoverflow.com/questions/19152613/xml-parse-no-memory-error-php

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Alexander Nitsche changed Duplicates #83580 08/29/21, 15:43

  2. Alexander Nitsche commented 08/29/21, 15:44

    This issue can be closed, as it is a duplicate of #83580.

  3. Riccardo De Contardi commented and changed status New Closed target version 05/09/22, 19:14

    Thank you for your reply and sorry for this very late feedback.

    Closed in agreement with the reporter as duplicate of #83580