Topic on Talk:Parsoid

Parsoid - Memory exhaustion on a big page

5
Summary by Arlolra

Something in the user's setup is enforcing the limit.

189.9.10.125 (talkcontribs)

Hello, I'm having some problems with mediawiki parsoid regarding memory exhaustion, can someone help me?

on a very big page (can't tell the exact size, but the original written on MS Word has more than 70 pages) I get the following issue

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 135168 bytes) in /var/www/html/mediawiki-1.35.1/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php on line 1683. Is an explode function


As you can see, it says the memory limit is 128M, but my phpinfo says 750M, configured via php.ini in several places to make sure (php.ini, php-fpm.conf)

from my phpinfo

memory_limit 750M 750M

here's a grep -r memory_limit on my /etc

php-fpm.d/www.conf:php_admin_value[memory_limit] = 750M

php.ini:memory_limit = 750M

so, both php.ini and fpm are configured with 750M


I already tryed to fix the memory_limit on the LocalSettings.php, but also no deal


PHP 7.4.14 (fpm-fcgi)

MediaWiki 1.35.1

Lua 5.1.5

ICU 65.1

MySQL 5.6.35-80.0-log

wikimedia/parsoid 0.12.1


Can someone help me? This is preventing me and my team to create long and important documents.

Thank you!

189.9.10.125 (talkcontribs)

Oh, and I did stop/restart php, phpfpm and httpd. Even restarted the OS.

189.9.10.125 (talkcontribs)

I also tryed to set ini_set( 'memory_limit', '750M' ); on wikitext2html and WikitextSerializer.php, inside serializeDOM, but it raises the same error

Arlolra (talkcontribs)

This isn't an inherent problem with Parsoid. On the WMF cluster, Parsoid runs with an ~1.4G memory limit, which it occasionally hits, but is certainly not limited to 128M

https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L18558-L18560

Something in your setup is enforcing that limit. Maybe it's the OS, maybe it's the HTTP server, or PHP configurations you're mentioning.

Try isolating it. You can run Parsoid on the command line with bin/parse.php

Pass it your large page and see if you run up against the memory limit there

189.9.10.125 (talkcontribs)

Ok, i'll try that,

thank you