Trellis/Vagrant Slow to load WordPress pages

Hi I’m using a multisite setup on Trellis and although it’s been fine for a few weeks I have encountered slowdown on the sites, regardless of plugins and themes enabled. I get load times of 60+ seconds, I’ve used Query Monitor, logged MariaDB slow queries, used htop and deactivated my wifi. Also reallocated memory and CPU to vagrant.

This affects all pages, back and front end of WordPress.

Currently I’m running out of ideas in what to test and how to check where the issue might be. Are there any suggestions for how i might narrow down if it’s a WordPress/dB/PHP or Vagrant issue?

The only time it’s not slow is if i vagrant reload, I get a short respite for one minute before it returns to being slow.

Hi. Please tell us more about your environment, and which environment(s) this issue occurs in.

Hi @MWDelaney, sorry for not getting back to you. I’m on Mac OS using Parallels. I’ve looked into this further and believe it may be to do with CRON’s and PHP more accurately as manually triggering certain CRON’s brings forward the issue.

Which is why running Vagrant Reload gives respite, but what I need to do is perhaps measure each PHP process and work it out that way to hone in on the exact CRON/Process.

I’ve seen a similar issue on Mac OSX. When these page loads take excessive time, does SSH interaction with the vagrant box also drop/become unresponsive?

Yes I have had that happen - where if I recall correctly entering commands seems to lag, but I didn’t connect the two occurances as it’s not always happening in relation to the slowness of the HTTP responses.

It’s a fairly new Mac with good specs, so it shouldn’t be related to resources, I also was sure to make more resources to available to Vagrant. Currently though I’m thinking it’s a PHP process which instigates the issue.

I’ll try my best to track down how I solved this in the past. I used to experience the exact same issue on my i9 32gb RAM MacBook Pro – if memory serves me right; it’s not related to the Trellis stack in any way.