Reparser:reparse quits half-way through

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
kot
Registered User
Posts: 68
Joined: Wed Mar 31, 2010 2:55 am

Reparser:reparse quits half-way through

Post by kot »

We're upgrading from an earlier version of phpBB and trying to integrate the reparser:reparse step into the automated conversion-process. Invoked as: php bin/phpbbcli.php reparser:reparse --ansi

The program runs for a while, but exits abruptly 54% through pm_text. The exit code is 255, but there are no error-messages displayed – despite the prior output being otherwise verbose and colorful.

The error_log in the phpBB directory contains:

Code: Select all

[12-Jun-2021 23:27:35 America/New_York] PHP Fatal error:  SQL ERROR [ mysqli ]<br /><br />
 MySQL server has gone away [2006]<br /><br />
 An SQL error occurred while fetching this page. Please contact the <a href="mailto:x@x">Board Administrator</a> if this problem persists. in /home/.../phpbb/db/driver/driver.php on line 1023
How do I find the text it chokes on, so I can correct it manually and reparse the rest?

The environment is:
  • PHP:|PHP 7.3.28 (cli) (built: Jun 10 2021 18:07:34) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.28, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
  • phpBB 3.3.4
  • MySQL 10.3.29-MariaDB
  • OS: CentOS Linux release 7.9.2009 (Core)
rxu
Extensions Development Team
Posts: 3712
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: Reparser:reparse quits half-way through

Post by rxu »

Will increasing verbosity with -vvv option help to get more info somehow?
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: Reparser:reparse quits half-way through

Post by JoshyPHP »

kot wrote: Fri Jun 18, 2021 2:17 pm MySQL server has gone away [2006]
Your DB either crashes or gives up for some reason, or mysqli loses its connection. I'd try reparsing fewer things at a time with --range-size=10. Check out your DB logs too.
I wrote the library that handles markup in phpBB 3.2+.
HB
Registered User
Posts: 208
Joined: Mon May 16, 2005 9:30 pm
Contact:

Re: Reparser:reparse quits half-way through

Post by HB »

kot wrote: Fri Jun 18, 2021 2:17 pmMySQL 10.3.29-MariaDB
Also see viewtopic.php?p=15622576#p15622576
danielgblack wrote: Wed Nov 11, 2020 9:45 pm MariaDB 10.5.8, 10.4.17, 10.3.27, and 10.2.36 is now available that corrects the excessive memory usage by long list of IN parameters that is presumed to be the cause of this error.
It's only a data point of one, but I'm using V10.5.10 and the reparser completes without error.
Dan Kehn
User avatar
kot
Registered User
Posts: 68
Joined: Wed Mar 31, 2010 2:55 am

Re: Reparser:reparse quits half-way through

Post by kot »

Thank you to all, who offered suggestions.
JoshyPHP wrote: Sat Jun 19, 2021 1:08 pm I'd try reparsing fewer things at a time with --range-size=10. Check out your DB logs too.
That took much longer, but still died at about the same spot (53%)... Nothing interesting in DB logs -- perhaps, they aren't verbose enough, but it is the hosting provider, that maintain them.
HB wrote: Sat Jun 19, 2021 5:59 pm MariaDB 10.5.8, 10.4.17, 10.3.27, and 10.2.36 is now available
Ours is 10.3.29, which should have the fix incorporated into 10.3.27...
rxu wrote: Sat Jun 19, 2021 2:33 am Will increasing verbosity with -vvv option help to get more info somehow?
These are the last two lines, I got before the reparse ended (with an error) again:

Code: Select all

...
[3750/7023][1 min/3 mins][20.0 MiB] Reparsing pm_text (range 3274..3283)
[3760/7023][2 mins/5 mins][20.0 MiB] Reparsing pm_text (range 3264..3273)
What do I do with that range -- 3264..3273? How do I find the "offending" text?
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: Reparser:reparse quits half-way through

Post by JoshyPHP »

Reparse them one by one, you'll probably see where it stops.

Code: Select all

./bin/phpbbcli.php reparser:reparse --range-min=3274 --range-max=3283 --range-size=1 pm_text
If it doesn't fail when reparsing a smaller number of rows, ask your web host about it too because some hosts automatically KILL connections that are left open for too long.
I wrote the library that handles markup in phpBB 3.2+.
User avatar
kot
Registered User
Posts: 68
Joined: Wed Mar 31, 2010 2:55 am

Re: Reparser:reparse quits half-way through

Post by kot »

JoshyPHP wrote: Sat Jun 19, 2021 8:14 pm Reparse them one by one, you'll probably see where it stops.
Ok, it is running now. Suppose, it chokes on 3267 -- what do I do with that information? Thank you!
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: Reparser:reparse quits half-way through

Post by JoshyPHP »

I'd probably look for the content of the private message #3267 via an SQL interface, see if it can be read. I don't know what you can do with that. Try asking your web host, see why the DB server bails or PHP loses its connection.

https://www.percona.com/blog/2020/09/25 ... -messages/
I wrote the library that handles markup in phpBB 3.2+.
Post Reply

Return to “[3.3.x] Support Forum”