Forum search randomly crashing

Has something gone haywire? Let us know about it!
Post Reply
User avatar
wirehead
Posts: 275
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Forum search randomly crashing

Post by wirehead » June 19th, 2022, 8:41 am

When I search "wireworld" in the global search box, and go to page 11 or 12, the page crashes and I get this:
General Error
SQL ERROR [ mysqli ]
MySQL server has gone away [2006]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
  • It only happens when I search "wireworld".
  • It only happens when I use the global search box at the top right; not any of the 'search this forum' boxes.
  • It only happens when I go to page 12.
  • It used to be page 11 months ago, so maybe one of the posts that comes up around there is triggering the error.
Anyone have any idea what is going on??
Langton's ant: Can't play the drums, can be taught.

AlbertArmStain
Posts: 1482
Joined: January 28th, 2022, 7:18 pm
Location: Planet Z

Re: Forum search randomly crashing

Post by AlbertArmStain » July 21st, 2022, 11:10 am

I got the same glitch when searching "TL" then going to page two.

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Forum search randomly crashing

Post by GUYTU6J » July 21st, 2022, 12:16 pm

AlbertArmStain wrote:
July 21st, 2022, 11:10 am
I got the same glitch when searching [keyword2] then going to page two.
Worth investigating. Please confirm accessibility of these requiries:

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword2]&ch=15&start=[x]
where [keyword2] is the one you said (I avoided mentioning it in this post because it will change the search result) and [x] is one of the integers from {1,2,26,27}.
wirehead wrote:
June 19th, 2022, 8:41 am
When I search [keyword1] in the global search box, and go to page 11 or 12, the page crashes...
Again, please try with your [keyword1] and

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword1]&ch=15&start=[y]
where y={265,266,291,292}. Then try again with the "&ch=15" part removed in the url.

User avatar
wirehead
Posts: 275
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Forum search randomly crashing

Post by wirehead » July 21st, 2022, 3:00 pm

GUYTU6J wrote:
July 21st, 2022, 12:16 pm
Worth investigating. Please confirm accessibility of these requiries:

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword2]&ch=15&start=[x]
where [keyword2] is the one you said (I avoided mentioning it in this post because it will change the search result) and [x] is one of the integers from {1,2,26,27}.
For [keyword2]:

1 works; 2, 26, and 27 crash.

For [keyword1]:

With "&ch=15" 265, 266, 291, 292 all work.

Without, 265 works; 266, 291, and 292 take a really long time to load but eventually work.

What does this mean?
Langton's ant: Can't play the drums, can be taught.

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Forum search randomly crashing

Post by GUYTU6J » July 21st, 2022, 10:14 pm

wirehead wrote:
July 21st, 2022, 3:00 pm
GUYTU6J wrote:
July 21st, 2022, 12:16 pm
Worth investigating. Please confirm accessibility of these requiries:

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword2]&ch=15&start=[x]
where [keyword2] is the one you said (I avoided mentioning it in this post because it will change the search result) and [x] is one of the integers from {1,2,26,27}.
For [keyword2]: 1 works; 2, 26, and 27 crash.
Interestingly, the crash for 2 and 26 is expected but 27 is not. Does the message I get for the first two match yours?

Code: Select all

Fatal error: Maximum execution time of 90 seconds exceeded in /home/psstoref/conwaylife/forums/includes/utf/utf_tools.php on line 107
That "start" parameter specifies which result to start display; for example, with 27 the topmost entry is a post entitled "Re: Oscillator Discussion Thread" from April 11, and with 28 it becomes the "Re: (34,7)c/156 caterpillar" post from April 10.
search.png
search.png (59.61 KiB) Viewed 10278 times
It allows one to fine-tune the list and then guess the cause of crash.
...
My theory is that the resource required to show certain very long posts in the search results exceeds maximum allowed, and now I think I have a clue. Please try

Code: Select all

https://conwaylife.com/forums/search.php?&author_id=1637&keywords=[keyword2]&start=[z]
where z={0,1}, and

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword2]&t=5588
with and without the "&ch=15" part.

User avatar
wirehead
Posts: 275
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Forum search randomly crashing

Post by wirehead » July 22nd, 2022, 3:27 pm

GUYTU6J wrote:
July 21st, 2022, 10:14 pm
Interestingly, the crash for 2 and 26 is expected but 27 is not. Does the message I get for the first two match yours?

Code: Select all

Fatal error: Maximum execution time of 90 seconds exceeded in /home/psstoref/conwaylife/forums/includes/utf/utf_tools.php on line 107
Yes, that's the same one I get for 27. I've never seen that error before -- it's not the same one as in the OP, it's just a cryptic line of unformatted HTML. Weird.
GUYTU6J wrote:
July 21st, 2022, 10:14 pm
My theory is that the resource required to show certain very long posts in the search results exceeds maximum allowed, and now I think I have a clue. Please try

Code: Select all

https://conwaylife.com/forums/search.php?&author_id=1637&keywords=[keyword2]&start=[z]
where z={0,1},
0: Crashes, same "...line 107" error.

1: Works. First item is this post.
GUYTU6J wrote:
July 21st, 2022, 10:14 pm
and

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword2]&t=5588
with and without the "&ch=15" part.
With: Crashes, same "...line 107" error.

Without: Works, and the only result is this post.

Strange... What does all this mean? Is it a bug in how Nathaniel has it set up, or, is it a bug in phpBB itself?
Langton's ant: Can't play the drums, can be taught.

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Forum search randomly crashing

Post by GUYTU6J » July 23rd, 2022, 9:35 am

wirehead wrote:
July 22nd, 2022, 3:27 pm
GUYTU6J wrote:
July 21st, 2022, 10:14 pm
Interestingly, the crash for 2 and 26 is expected but 27 is not. Does the message I get for the first two match yours?

Code: Select all

Fatal error: Maximum execution time of 90 seconds exceeded in /home/psstoref/conwaylife/forums/includes/utf/utf_tools.php on line 107
Yes, that's the same one I get for 27. I've never seen that error before -- it's not the same one as in the OP, it's just a cryptic line of unformatted HTML. Weird.
So my previous idea could be a bit misleading... The two errors, "MySQL gone away" and "execution time exceeded" respectively, may have distinct and unrelated causes. Can you reproduce the "MySQL gone away" error with some other [y] in close proximity in the [keyword1] test?
...
Without: Works, and the only result is this post.

Strange... What does all this mean? Is it a bug in how Nathaniel has it set up, or, is it a bug in phpBB itself?
These two results match my anticipation well. (For those who want to repeat these tests, note that due to LaundryPizza03's two posts in the OCA subforum today containing [keyword2], the [x] above is displaced by 2.) That hyperlinked sole result has a hundred-line Golly script using a lengthy base64 encoding in one line (i.e. no linebreaks).

As far as I see from outside, when the post is picked up by a query in some mode (explained below), the utf_tools.php will attempt to locate the input, truncate other characters nearby and highlight the keyword in the displayed list. However, processing a one-line base64 encoding from a long post accordingly will take overwhelmingly long, and printing the very long <s>boat</s> post to the screen can also be memory-intensive. Eventually it gives up, providing an "execution time exceeded" error.

Generally every piece of overly long one-line content could be a potential threat, not limited to random base64 encodings, as exemplified by the top post from this query:

Code: Select all

https://conwaylife.com/forums/search.php?keywords=[keyword1]&start=291
The search mode, determined by url parameters, is a key factor in performance. In this case, the "&t=5588" search mode shows the post as a whole, preserving the code box format. I suspect that in other modes, the code box format is disrupted, which contributes to the "execution time exceeded" error as well. In the last comparison, the "&ch=15" mode for truncating other characters around the keyword to 15 is believed to disrupte the code box.

All of the primary analysis above is from an Amateur Crash Investigator; where are the truly responsible ones for pan-pan signals like this?

User avatar
wirehead
Posts: 275
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Forum search randomly crashing

Post by wirehead » July 23rd, 2022, 6:37 pm

GUYTU6J wrote:
July 23rd, 2022, 9:35 am
So my previous idea could be a bit misleading... The two errors, "MySQL gone away" and "execution time exceeded" respectively, may have distinct and unrelated causes. Can you reproduce the "MySQL gone away" error with some other [y] in close proximity in the [keyword1] test?
I tried and I can't. I found this bug by accident. If it crops up again with [keyword1] and [y] is not 275, I'll let you know.
Langton's ant: Can't play the drums, can be taught.

Citation needed
Posts: 283
Joined: April 1st, 2021, 1:03 am

Re: Forum search randomly crashing

Post by Citation needed » July 26th, 2022, 2:28 am

The server went down for a while with the same error message, and I couldn't even access the wiki.

User avatar
Vort
Posts: 134
Joined: May 14th, 2024, 6:35 am

Re: Forum search randomly crashing

Post by Vort » August 6th, 2024, 3:57 am

I read this message and decided to search for one of "infinite" families: search.php?keywords=7%2B6x
But result was this:
Fatal error: Maximum execution time of 90 seconds exceeded in /home/psstoref/conwaylife/forums/includes/utf/utf_tools.php on line 107
I know that some search engines are having problems with queries, which are short and contains special characters, but if engine can't handle such query, I more expect to see message like "special characters are not allowed" or "short words are not allowed" than what forum presented to me.

(I found that family by manually checking all 3 pages of that topic)

Post Reply