lpaulsen93 / dokuwiki-plugin-odt

Exports a page to the Open Document format used by OpenOffice.org and other word processors
http://www.dokuwiki.org/plugin:odt
13 stars 26 forks source link

creating a small document exceeds memory #292

Open hom-mp opened 1 year ago

hom-mp commented 1 year ago

Hi, I use the current stable version of wiki (2023-04-04 "Jack Jackrum") together with the current stable version of Open Document Plugin (2023-03-03).

What I see is that creating even a simple ODT file from a dokuwiki page (https://help.m-privacy.de/doku.php/tightgate-firewall:administrationskonzept) the size of the created file is very large (54 MB!). When I open the document with LibreOffice and just save it again the size reduces to 72 KiB. So creating a book with more than 3 pages exceeds the complete memory of the server.

I think there's a bug in the creation. Can you please check?

Klap-in commented 1 year ago

If you try with the previous versions, do you see differences between them? https://github.com/lpaulsen93/dokuwiki-plugin-odt/releases

hom-mp commented 1 year ago

ok, I spent some more time in debugging.

All odt-plugin-versions behave the same way an creates very large files with the stable version of wiki (2023-04-04 "Jack Jackrum"). But when I reset the wiki version back to oldatsble (2022-07-31a "Igor") all odt-plugins works fine. So there must be the bug in the new wiki version.

There is also no difference in the used PHP version. I tested with PHP 7.4 and 8.2. There was also nothing interesting in the apache-log or the dokuwiki-log what might help.

Klap-in commented 1 year ago

There were also recent reported other slow downs due to missing mbstring extension in php. That might be something to check? (You can get more info by adding ?do=check to the url)

kojir0 commented 1 year ago

we have same issue with mbstring activated. We had to rollback to old stable dokuwiki version.

If we don't specify a template in the ODT part it works but without our template:

{{odt>template:documentationv6.odt}}

We got this in log

2023-06-06 08:16:14E_ERROR: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 595045768 bytes) /var/www/html/vendor/splitbrain/php-archive/src/Zip.php(814)
    #0 [internal function]: dokuwiki\ErrorHandler::fatalShutdown()
    #1 {main}