Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4220
Latest: agolac
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 42854
Total Topics: 7464
Most Online Today: 112
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 51
Total: 51

Author Topic: Hang after upgrade MariaDB to version 10.5  (Read 1545 times)

0 Members and 1 Guest are viewing this topic.

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Hang after upgrade MariaDB to version 10.5
« on: December 27, 2020, 10:43:40 am »
Hello SMFHacks,

I hope you are fine these days!

We've updated our MariaDB 5.5 to 10.5 today and all though the forum is working fine, the gallery makes the database using 300% memory and we need to kill MariaDB, PHP and httpd and start them again to bring the website alive. We tried to check and correct the database but there are no issues found...... and the most irritating thing is that there are no errors, not in the SMF log, not in the server logs.

Most strange is that I can access the Gallery as an Admin without any issue but as any other member (or guest) it makes the whole website unreachable by an crash or 'freeze' from the database. And because we're still using the good old SMFGalleryPro version 5, I updated today to version 9beta but still having the same issue. So I needed to disable the Gallery for now.

Do you have any Idea and can you help me with this? Thank you so much!!

Vincent Volmer

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #1 on: December 27, 2020, 10:49:37 am »
When run can see any database queries running via phpmyadmin that are taking a long time?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #2 on: December 27, 2020, 11:33:37 am »
I see one query with a long time..... :

SELECT max(com.ID_COMMENT) AS lastcomment, p.id_picture, p.commenttotal, p.totalratings, p.rating, p.filesize, p.views, p.thumbfilename, p.title, p.id_member, m.real_name, p.date, p.description, p.mature, c.view, v.id_picture as unread, mg.online_color, p.totallikes FROM (smf_gallery_pic as p, smf_gallery_comment as com) LEFT JOIN smf_members AS m ON (m.id_member = p.id_member) LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = IF(m.ID_GROUP = 0, m.ID_POST_GROUP, m.ID_GROUP)) LEFT JOIN smf_gallery_usersettings AS s ON (s.id_member = m.id_member) LEFT JOIN smf_gallery_catperm AS c ON (c.id_group IN (0,6) AND c.id_cat = p.id_cat) LEFT JOIN smf_gallery_log_mark_view AS v ON (p.id_picture = v.id_picture AND v.id_member = 5458 AND v.user_id_cat = p.USER_ID_CAT) WHERE com.id_picture = p.id_picture AND ( ((s.private = 0 || s.private IS NULL) AND (s.password = '' || s.password IS NULL) AND p.user_id_cat != 0 AND p.approved = 1) || (p.approved = 1 AND p.user_id_cat = 0 AND (c.view IS NULL || c.view = 1))) GROUP by p.id_picture ORDER BY lastcomment DESC LIMIT 12

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #3 on: December 27, 2020, 11:40:20 am »
Run this query and post back full results
Code: [Select]
EXPLAIN SELECT max(com.ID_COMMENT) AS lastcomment, p.id_picture, p.commenttotal, p.totalratings, p.rating, p.filesize, p.views, p.thumbfilename, p.title, p.id_member, m.real_name, p.date, p.description, p.mature, c.view, v.id_picture as unread, mg.online_color, p.totallikes FROM (smf_gallery_pic as p, smf_gallery_comment as com) LEFT JOIN smf_members AS m ON (m.id_member = p.id_member) LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = IF(m.ID_GROUP = 0, m.ID_POST_GROUP, m.ID_GROUP)) LEFT JOIN smf_gallery_usersettings AS s ON (s.id_member = m.id_member) LEFT JOIN smf_gallery_catperm AS c ON (c.id_group IN (0,6) AND c.id_cat = p.id_cat) LEFT JOIN smf_gallery_log_mark_view AS v ON (p.id_picture = v.id_picture AND v.id_member = 5458 AND v.user_id_cat = p.USER_ID_CAT) WHERE com.id_picture = p.id_picture AND ( ((s.private = 0 || s.private IS NULL) AND (s.password = '' || s.password IS NULL) AND p.user_id_cat != 0 AND p.approved = 1) || (p.approved = 1 AND p.user_id_cat = 0 AND (c.view IS NULL || c.view = 1))) GROUP by p.id_picture ORDER BY lastcomment DESC LIMIT 12
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #4 on: December 27, 2020, 11:47:14 am »
Hello,

please see attachment

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #5 on: December 27, 2020, 11:57:58 am »
After disabling "recent comments on index" the page is loading fine...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #6 on: December 27, 2020, 11:59:56 am »

Yeah just was going to post that

I would disable the Recent Comments main page block under layout settings. That looks like the slowdown.

Not sure why mariadb is missing a key. I see in the explain the com table is Null


Test your stats page too in the gallery.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #7 on: December 27, 2020, 12:05:10 pm »
Stats is looking good: please see  https://digiscrap.nl/gallery/?sa=stats

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #8 on: December 27, 2020, 12:18:56 pm »
Run this query too
Code: [Select]
show index from smf_gallery_comment
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #9 on: December 27, 2020, 12:23:06 pm »
Hereby

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #10 on: December 27, 2020, 12:26:19 pm »
Ok that's the issue.

Run
Code: [Select]
Alter table smf_gallery_comment ADD index id_picture (id_picture);

That recent comment query should work fast now hopefully
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Hang after upgrade MariaDB to version 10.5
« Reply #11 on: December 27, 2020, 12:41:55 pm »
Hello,

Thanks! Yes... it is working again. Thanks you! Is this error caused by the MariaDB upgrade?

Cheers! I'm really happy ;)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16257
    • View Profile
Re: Hang after upgrade MariaDB to version 10.5
« Reply #12 on: December 27, 2020, 12:56:07 pm »
No, was missing and index will fix for next update.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
37 Replies
25021 Views
Last post December 27, 2007, 10:22:10 pm
by SMFHacks
2 Replies
3917 Views
Last post August 28, 2009, 12:17:40 pm
by Grumpy Smurf
6 Replies
5925 Views
Last post November 28, 2009, 03:17:09 pm
by SMFHacks
2 Replies
3443 Views
Last post September 29, 2013, 01:20:39 pm
by dan4ever
1 Replies
2124 Views
Last post July 28, 2014, 12:58:26 pm
by Panoulis64

+- Recent Topics

Is the PayPal Sandbox still working? by Nicole
Today at 06:51:18 am

Question on Completed Listing & Reserve Price by Nicole
June 01, 2023, 06:06:12 pm

[Mod]GDPR Helper by Nicole
May 29, 2023, 11:58:49 pm

RSS Feed Poster Database Error by SMFHacks
May 22, 2023, 06:26:18 pm

Errors With Older Version. by Ken.
May 09, 2023, 05:35:40 pm

Pretty Urls SEO Pro by SMFHacks
May 06, 2023, 03:30:11 pm

New Post Image Upload Error by Mike66
April 28, 2023, 07:30:28 am

Copyright Removal Key by SMFHacks
April 03, 2023, 02:44:28 pm

Converting from Aeva Media by sudhakar
April 02, 2023, 11:09:54 am

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Powered by EzPortal