jbolecke's avatar

Slow migrations on local machine

Hi all,

as you can see in the Video ( https://vimeo.com/597774651 ) my Laravel migrations run very slow on my local machine (MacBook Pro) compared to my staging server (VPS). I have those performance issues across all Laravel projects on my local machine. I think I experienced this for almost two months now and tried multiple things to fix it.

Used software on local machine (macOS) and VPS (CentOS):

On my local machine I'm using Homebrew and Valet.

Since I recognised those performance issues I tried to edit the config of MariaDB and restarted the database server but I noticed that it didn't make any difference and restored the default config. My first guess was that it has to do something with the PHP Version because I recently upgraded from PHP 7.4 to 8.0. But tests with PHP 7.4 showed that the issue persists regardless of the used PHP Version.

Another weird thing I noticed is that the performance of all my applications in the browser via Valet are normal. Only my migrations and tests (probably also because of the migrations) are very slow.

Has anyone an idea how this can be fixed?

1 like
9 replies
ovvessem's avatar

I had the same experience and downgrading my brew install of MariaDB to 10.5 solved it for my machine.

1 like
Tim-Frensch's avatar

Anyone know what is causing this? I would like to keep using MariaDB 10.6. But the migrations are really slowing down testing.

peter.lupu's avatar

Bump x months later... Did a little digging after experiencing the same issue and found nothing worth noting.

Although.. In docker, 10.5, 10.6, 10.7 have similar performance, but a little worse than homebrew 10.5. So I'm thinking something broke on MacOS (not Linux) sometime between 10.5 and 10.6

kalvinmizzi's avatar

Me and my whole team experienced this. I couldn't figure out why a new macbook pro with way better specs than my PC was running migrate:fresh in over 30 seconds vs. 11 seconds on my PC. I downgraded to 10.5 and now it runs in 7 seconds on the mac!

kalvinmizzi's avatar

Does anyone know if this was fixed in later versions of mariadb? We are still locked to 10.5 because of it

JussiMannisto's avatar

You've waited 11 months for someone to reply rather than test it yourself?

1 like

Please or to participate in this conversation.