Advertisement

Table metadata lock Topic is solved

Need help upgrading your Joomla! website or converting to Joomla! 5.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
mtnpavlas
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Mar 26, 2025 5:32 pm

Table metadata lock

Post by mtnpavlas » Wed Mar 26, 2025 5:56 pm

After a recent upgrade to Joomla 5.2.5 (from J4) and jEvents 3.6.85, we see a frequent (about 1x/hr, but it's totally random) table lock, which results in jEvents pages (calendar or event details page, etc.) to take forever to load (and they never do, the browser just keeps on spinning). Eventually, the entire site crashes.

Narrowed it down to mySQL/MariaDB freezing with the "Waiting for table metadata lock" error in the processes when it's trying to run the following query:

Code: Select all

ALTER TABLE mtb_jevents_vevdetail MODIFY dtend BIGINT NOT NULL
Once we kill the above process, all of the other mySQL processes clear within seconds, and the site comes happily back online.

I'm assuming it's jEvents triggerig this query, no? Not sure why, though, as the schema already has those parameters, i.e., the dtend field is of BIGINT type and NOT NULL already.

Storage engine on the jEvents tables is MyISAM and collation utf8mb3_general_ci (while the other Joomla tables are InnoDB and utf8mb4_unicode_ci) ... in case that matters.

Also, MariaDB version is: 10.6.19-MariaDB-log
PHP: 8.1.32
LAMP stack on a VPS server

Really at my wits' end - any pointers here please? Posted in the jEvents forum, as well, as we're paying Gold Member, but 2 days later still no reply, sadly. Thank you so much!

Advertisement
User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31733
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Table metadata lock

Post by Per Yngve Berg » Wed Mar 26, 2025 7:02 pm

You should definitely change all tables to InnoDB and utf8mb4_unicode_ci

Using a mix may cause dificulty comparing values.

mtnpavlas
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Mar 26, 2025 5:32 pm

Re: Table metadata lock

Post by mtnpavlas » Thu Mar 27, 2025 7:40 pm

Thank you for the input - I have switched the engine to InnoDB, and there's been no d/b locking / website crashing since (fingers crossed it stays that way). Will continue to work with the jEvents folks on why this offensive query keeps on running in the first place - IMO, there should be no need for altering tables after the initial install/upgrade procedure.
Thank you again - marking resolved.

Advertisement

Post Reply

Return to “Migrating and Upgrading to Joomla! 5.x”