Opened 19 months ago
Last modified 19 months ago
#57943 new defect (bug)
Massive SQL statement shown in Dashboard WordPress Events and News. WordPress database error Got a packet bigger than 'max_allowed_packet'
Reported by: | ipajen | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-testing-info needs-testing reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
Bug Report
Massive SQL statement shown in Dashboard WordPress Events and News. WordPress database error Got a packet bigger than 'max_allowed_packet'
Environment
- OS: Windows 10
- Server: Apache (WINNT)
- PHP: 8.2.0
- WordPress: 6.2-RC2
- Browser: Edge
- Theme: Twenty Ten 3.7
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.3.1
- WP SMS 6.1.1
Steps to Reproduce
Not sure but maybe:
- Debugging enabled.
define( 'WP_DEBUG', true); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', true );
- Set max_allowed_packet to very low value.
- GO to http://localhost/test/wp-admin/index.php
- 🐞 Bug occurs.
Expected Results
- ✅ WordPress Events and News should be shown.
- ✅ If failed a user friendly message shown in GUI
- ✅ Not to log 18 MB of errors.
Actual Results
- ❌ Massive SQL statement was shown
- ❌ User friendly error message was not shown in GUI
- ❌ Logging was made of 18MB
Some few lines from the logfile.
17-Mar-2023 18:13:23 UTC] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ( '_transient_feed_d117b5738fbd35bd8c0391cda1f2b5d9', 'a:4:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:s:4:\"data\";s:3:\"\n\n\n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:61:\"\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\";s:7:\"attribs\";a:0:}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5{s:4:\"data\";s:16:\"WordPress Planet\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"language\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"en\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:47:\"WordPress Planet - http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"item\";a:50:{i:0;a:6:{s:4:\"data\";s:13:\"\n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"WordCamp Central: WordCamp Buffalo 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"https://central.wordcamp.org/?p=3163106\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:64:\"https://central.wordcamp.org/news/2023/03/wordcamp-buffalo-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1802:\"<a href=\"https://profiles.wordpress.org/empireoflight/\"><img /></a>WordCamp Buffalo 2023 logo. Design by Ben Dunkle.\n\n\n\n<p>Buffalo again will host the region’s WordCamp for bloggers and web designers and developers of all skill levels. Novices are very welcome. WordCamp Buffalo will be held Saturday, May 6, 2023.</p>\n\n\n\n<p>Registration opens at 8:00am. Sessions begin at 9 a.m. and continue through 5 p.m. This year’s WordCamp will be held at Ken-Ton Elmwood Commons, 3200 Elmwood Ave Suite 110, Kenmore, NY 14217. Tickets are required in advance.</p>\n\n\n\n<p>The $25 ticket cost covers WordCamp Buffalo swag, morning coffee, lunch, and the evenings’s after-party food. Participants are strongly encouraged to bring their laptops or tablets. Ticket purchase and program details are available at <a href=\"https://buffalo.wordcamp.org/2023\">buffalo.wordcamp.org/2023</a>. The capacity for this event is about 120 people, so getting tickets early is advised.</p>\n\n\n\n<p>WordCamps are held worldwide, locally run and purposely at a low cost for accessibility to all. WordCamp Buffalo is dedicated to WordPress, blogging and web facility. WordCamps are sponsored by WordPress, the open-source, free, not-for-profit platform for individuals, groups and businesses to build their own blogs and websites. WordPress.org began in 2003. Its administrators call it the “largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.”</p>\n\n\n\n<p>Similar to previous years, Buffalo’s 2023 WordCamp will divide its workshops along two tracks, with sessions for every ability and level of use.</p>\n\n\n\n<p>Speakers will include WordPress users from Buffalo, Rochester, and beyond, with experience ranging from user/blogger to advanced developer.</p>\";s:7:\
If you need the full log, let me know but as I don't know what's included I don't want share in the public ticket.
Change History (5)
#2
follow-up:
↓ 4
@
19 months ago
- Component changed from General to Administration
- Description modified (diff)
- Keywords has-testing-info needs-testing reporter-feedback added
Hi @ipajen, thanks for opening this ticket!
Does this also occur on WordPress 6.1.1?
#3
in reply to:
↑ 1
@
19 months ago
Replying to nolanw92:
Hi @ipajen,
To allow this issue to be more easily reproducible, what value do you have
max_allowed_packet
set to?
When this happened It was the default values in XAMPP
From C:\xampp\mysql\bin\my.ini
[mysqldump]
max_allowed_packet=16M
[mysqld]
max_allowed_packet=1M
Even if I try to set both the values to 0 KB and restart XAMPP it doesn't give the error again in Dashboard WordPress Events and News. But it shows a SQL statement in http://localhost/test/wp-admin/update-core.php
As WP_DEBUG_DISPLAY is ON, should it show the full SQL statement in GUI ? If so its OK but the problem was when it happened in Dashboard WordPress Events and News and the data was massive and not sure why it wanted to save all the data.
Part of the log it wanted to save:
Hey everybody, welcome back to post draft. Um, I don\'t even know what to characterize this, uh, this se, this interview, Brian. Um, but I\'ve got a very old longtime friend, not that he\'s old, just that we go way back. Um, to, when I started with WordPress, I found this guy named Brian Gardner. And so I thought, um, who better to talk about with WordPress being 20th this year, our 20th anniversary, um, Brian, who was instrumental in a lot of things that helped, um, Build and grow this cool ecosystem we call the business of WordPress.</p>\n\n\n\n<p>But anyway, um, Brian, welcome back. I think you\'ve been interviewed before, probably like by Brian or somebody. Yeah. But welcome, welcome to the post draft podcast.</p>\n\n\n\n<p><strong>Brian Gardner:</strong> Uh, thank you for having me. Uh, one point of clarification. I am old. I\'m 48. Um, nearing, nearing 50. And in, you know, today\'s terms and. Even as it relates to [00:01:00] WordPress and people who are in this ecosystem.</p>\n\n\n\n<p>I\'m old and I\'m okay with that. Cause, uh, with, with that comes wisdom and experience and, uh, the ability to shepherd. So, uh, I embrace the stage of life that I\'m in.</p>\n\n\n\n<p><strong>Cory Miller:</strong> Yeah. That\'s awesome. Well, you know, when we first started and met, we were in our thirties . Now we\'re in our forties, and it\'s like, uh, I thought there\'s a nostalgic fact to that.</p>\n\n\n\n<p>Absolutely. But also, yeah, you\'ve, you\'ve been there and seen things evolve over the years. Um, okay. So thank you for that. Thank you for being on, being on today. Um, I, uh, I wanted to talk a little bit about the past. Um, and tell me how you found WordPress.</p>\n\n\n\n<p><strong>Brian Gardner:</strong> I don\'t even know if I know the story, by the way.</p>\n\n\n\n<p>Yeah. You know, like it\'s been a while since I\'ve told the story. Um, and, and a lot of things I talk about, people still don\'t even understand what, what it was or what it was back in the day because it just, you know, they\'re [00:02:00] newer and stuff like that. Um, but I was working as a project manager at an architectural firm, and I just wanted to start writing and blogging.</p>\n\n\n\n<p>Blogging at
Not sure how to recreate the issue just in Dashboard WordPress Events and News.
#4
in reply to:
↑ 2
@
19 months ago
Replying to costdev:
Hi @ipajen, thanks for opening this ticket!
Does this also occur on WordPress 6.1.1?
Sorry cant reproduce the issue. https://core.trac.wordpress.org/ticket/57943#comment:3
Guessing it happens because of the data received to the Dashboard WordPress Events was maybe corrupt or wrong format and massive over the max_allowed_packet and then it wanted to save all to the databas so error accord and then logged everything. Don't know if its the best solution but is it possible to save a max length of the data in logs if it happens again?
Hi @ipajen,
To allow this issue to be more easily reproducible, what value do you have
max_allowed_packet
set to?