Memory exhausted trying to export on ojs 2.4.5

Hi all,

Recently a fellow reported an WSOD when trying to native-export an issue to xml on an ojs 2.4.5 over php 5.6.33-0+deb8u1 and mysql 5.5.60-0+deb8u1.

I review my logs and I found this:

[21-Dec-2018 12:59:10 Europe/Berlin] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1207147722 bytes) in /home/ojs/source/versions/git-ojs/lib/pkp/classes/xml/ on line 109

So I changed my “memory_limit” from 512M to 1024M (that is huge) and I also changed the “execution_time” to 600 (that is an eternity) and the error is still the same.

Any suggestion about how to deal with it?

Thanks a lot in advance,

The Native export will try to serialize each galley file into the XML itself. This could lead to really large results, if the galley files are of any substantial size:

You might try exporting groups of articles rather than the issue to see how many can be exported before the memory is exhausted. (Or, to see if one specific article is to blame.)

You might instead want to just change that line of code to copy the file to a temporary location and then reference it by path or URL instead in the export.

1 Like

Thanks a lot Clinton.