You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two cases where shortcode-core plugins fails when generating search index for tntsearch plugin.
sh-5.1$ bin/plugin tntsearch index
Re-indexing
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /opt/app-root/src/user/plugins/shortcode-core/vendor/thunderer/shortcode/src/Parser/RegularParser.php on line 339
Test case 1 - HTML content
Test case 2 - Markdown content
From the Xdebug traces provided you will see that preg_match_all() statement in Thunderer Shortcode library uses almost 30MB for test case 1 parsing. For test case 2 it is almost 80MB!
I'm not sure why in one case TNT Search command line is parsing our page as HTML, but in other case it is parsing it as Markdown. All of our pages are stored as Markdown files on disk. Maybe it is something to do with HTML cache.
Anyway, this is what I see in full Xdebug trace when running "bin/plugin tntsearch index", so minimal reproducible cases in ZIP files are prepared accordingly.
Snippet from full Xdebug session of HTML page parsing:
I have two cases where shortcode-core plugins fails when generating search index for tntsearch plugin.
Based on previous issues in #53 and the code in thunderer/Shortcode#71 I have prepared two reproducible test cases https://1drv.ms/f/s!AgnMn-haWyFrkcN50beuEO4A0m6PQw?e=GjwcEV
Test case 1 - HTML content
Test case 2 - Markdown content
From the Xdebug traces provided you will see that preg_match_all() statement in Thunderer Shortcode library uses almost 30MB for test case 1 parsing. For test case 2 it is almost 80MB!
I'm not sure why in one case TNT Search command line is parsing our page as HTML, but in other case it is parsing it as Markdown. All of our pages are stored as Markdown files on disk. Maybe it is something to do with HTML cache.
Anyway, this is what I see in full Xdebug trace when running "bin/plugin tntsearch index", so minimal reproducible cases in ZIP files are prepared accordingly.
Snippet from full Xdebug session of HTML page parsing:
Snippet from full Xdebug session of Markdown page parsing:
Sadly full Xdebug trace is very big so it would be difficult to share it.
I hope it is enough information to fix this.
The text was updated successfully, but these errors were encountered: