Pages

Strange SQL error - Pages

Strange SQL error

by rfstasis » Fri Mar 06, 2020 3:33 pm

I get this weird error everytime i go to a Page. Can anyone help me out here so I can fix this.
Attachments
2RQ9AsB.png
rfstasis
Registered User
Posts: 3
Joined: Fri Mar 06, 2020 3:26 pm
Contact:

Re: Strange SQL error

by MattF » Fri Mar 06, 2020 6:31 pm

That’s a problem with your phpBB. Ask for General phpBB support.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5281
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Strange SQL error

by rfstasis » Wed Mar 11, 2020 8:00 am

I am the general phpBB support. But beyond the installation I got no clue what to do. Does anyone have an idea how I can fix this please.
rfstasis
Registered User
Posts: 3
Joined: Fri Mar 06, 2020 3:26 pm
Contact:

Re: Strange SQL error

by rfstasis » Wed Mar 18, 2020 8:43 am

This only happens on Pages, nowhere else. Please help
rfstasis
Registered User
Posts: 3
Joined: Fri Mar 06, 2020 3:26 pm
Contact:

Re: Strange SQL error

by dimassamid » Tue May 05, 2020 2:11 am

Hello!
I have a SQL error while trying to edit some pages in ACP. Could you help me please?

Code: Select all

SQL ERROR [ mysqli ]

MySQL server has gone away [2006]

SQL

SELECT ppl.*, pl.page_link_location, pl.page_link_event_name, p.page_route, p.page_title, p.page_icon_font, p.page_display, p.page_display_to_guests FROM (phpbb_pages_pages_links ppl) LEFT JOIN phpbb_pages_links pl ON (pl.page_link_id = ppl.page_link_id) LEFT JOIN phpbb_pages p ON (p.page_id = ppl.page_id) WHERE ppl.page_id = 3 ORDER BY p.page_order ASC, ppl.page_link_id ASC

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1023
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 195
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 345
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/phpbb/pages/operators/page.php
LINE: 283
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/phpbb/pages/controller/admin_controller.php
LINE: 469
CALL: phpbb\pages\operators\page->get_page_links()

FILE: [ROOT]/ext/phpbb/pages/controller/admin_controller.php
LINE: 330
CALL: phpbb\pages\controller\admin_controller->create_page_link_options()

FILE: [ROOT]/ext/phpbb/pages/controller/admin_controller.php
LINE: 167
CALL: phpbb\pages\controller\admin_controller->add_edit_page_data()

FILE: [ROOT]/ext/phpbb/pages/acp/pages_module.php
LINE: 70
CALL: phpbb\pages\controller\admin_controller->edit_page()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: phpbb\pages\acp\pages_module->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm
Contact:

Re: Strange SQL error

by rxu » Tue May 05, 2020 3:44 am

rfstasis wrote:I am the general phpBB support.
General support is here viewforum.php?f=551

But anyway, most likely you have faced this bug https://tracker.phpbb.com/browse/PHPBB3-16314 which is fixed in upcoming phpBB 3.3.1. Unrelated to the Pages extension.
rxu
Extensions Development Team
Posts: 3430
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Strange SQL error

by rxu » Tue May 05, 2020 3:54 am

dimassamid wrote:MySQL server has gone away [2006]
This is often a server connection timeout, so MySQL server settings related.
rxu
Extensions Development Team
Posts: 3430
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Strange SQL error

by dimassamid » Tue May 05, 2020 4:06 am

A database crashes happens only when editing large articles. There was no such problem in the phpBB 3.2.8
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm
Contact:

Re: Strange SQL error

by dimassamid » Tue May 05, 2020 4:45 am

I've found the problem
MySQL timeout occurs if the article contains many links that are processed through Media Embed PlugIn.
For example, try to add some links to bandcamp music service and then try to edit such page:
05-05-2020 7-36-41.png
If I disable the Media Embed PlugIn, the MySQL crash does not occur.

Does anyone else have a similar conflict with the Media Embed PlugIn?
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm
Contact:

Re: Strange SQL error

by rxu » Tue May 05, 2020 5:17 am

Hmm, indeed.

Tried with Media embed plugin enabled:
Time spent on postgres queries: 0.00618s | Time spent on PHP: 22.7842s

Disabled:
Time spent on postgres queries: 0.00539s | Time spent on PHP: 0.2456s

So seems to be PHP side overhead.
rxu
Extensions Development Team
Posts: 3430
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Strange SQL error

by rxu » Wed May 06, 2020 9:08 am

The problem here is that Mediaembed scrapes and parses every link given which takes a very long time to curl all of that. The more links -> the more time is needed.
I'll look into improving process by caching scrape results into a local file.
rxu
Extensions Development Team
Posts: 3430
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Strange SQL error

by dimassamid » Wed Sep 16, 2020 8:24 am

Hello,

Did I understand correctly that these changes were implemented in the latest version of phpBB Media Embed PlugIn?
https://github.com/phpbb-extensions/med ... 566f6a3971
After update to 1.1.2 it stopped working. I have this error again.
Could you please check compatibility Media Embed PlugIn 1.1.2 with Pages? Thanks!
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm
Contact:

Re: Strange SQL error

by dimassamid » Fri Sep 18, 2020 4:00 am

The problem has been solved. Need to enable cache option in the 'Media Embed PlugIn' settings. This option has been integrated into the extension since 1.1.2 version.
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm
Contact: