Using MariaDB add 2 seconds per request to load standard WP install

Using MariaDB instead of MySQL adds 2 seconds for each request

When setting up a fresh new site, when choosing MariaDB for the DB, instead of MySQL, every request immediately is delayed by 2 seconds. I used the Laps plugin to pinpoint the delay to the “Core & MU Plugin load” Phase. With MySQL this phase typically is 10 or 20 ms, with MariaDB it becomes 2025 ms or thereabouts. Can it be this loading phase is hitting some timeout (of 2 sec) and then decides to move on?

Thanks in advance,
Ruud

  • Does this happen for all sites in Local, or just one in particular?

All sites

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Yes

Replication

  • Using windows 11, install Local 6.7.0 and add a fresh install.
  • Select MariaDB for the DB
  • Install the Laps plugin (https://github.com/Rarst/laps)

Compare this to an identical fresh install with MySQL

System Details

  • Which version of Local is being used?

6.7.0

  • What Operating System (OS) and OS version is being used?

Windows 11 Pro

  • WordPress version

WordPress 6.2

  • Attach the Local Log. See this Help Doc for instructions on how to do so:

I checked the error-log, but did not have anything in regards to this new fresh install I just made.
It works, but is just 2 seconds slower.

I noticed this slowdown effect before on other projects and switched to using MySQL instead, which actually requires to remake a new project so quite bothersome.

I found references to MariaDB in the router log, so will add that file
local-lightning.log (17.5 KB)

Hi @Ruud

Where are you changing from MySQL to MariaDB?

Hi Nick,

It is not so much ‘changing’ as you would with the PHP version or webserver, but instead create a new install (this time around select MySQL) and copy all relevant project code into the newly created install.

All my projects which I changed this way instantly became much faster by loosing these 2 seconds lag.

Hope this helps,
Ruud

Hi Ruud, I just created an account so that I can reply to this. Thanks for posting about this, I was starting to think I was the only one with this issue. I’m experiencing the same thing. Creating a fresh new site with MariaDB gives me 2-2.5s pageload times, where as with MySQL it’s 0.05s. I double and triple checked it, and always get the same results. Same details as you: Windows 11 Pro + LocalWP 6.7.0 + WordPress 6.2

Hi @m0py!
Thanks for posting to this thread and good to hear someone else also experiences the same issues :sunglasses:

I do hope someone from the the Local development team is able to have a look at this now that we have more cases with the same issue.

Cheers!
Ruud

Hi all! I tested the version 7.0.1 and the problem still persists.

With the Laps plugin (see description above) I get this output =>
For reference the "Core & MU Plugins load bar is only about 15ms when using MySQL instead of MariaDB.

Thanks,
Ruud

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.