Local Site Slows over time

What issue or error are you experiencing?

After running a site for a period of time, it takes a while to respond. I do have Debug enabled as I am developing and need to be able to test/walkthrough code. Oddly, when this happens, if I switch PHP versions, then switch back, the site seems responsive for a short period. Then it is rinse and repeat.

Normally I am using PHP 8.3.23 for work and if I switch to 8.2.29 and then back to 8.3.23, then I can work normally again for a short period. Then it starts to slow down again.


System Details

  • Local Version: 9.2.8+6882

  • Operating System (OS) and OS version: MBP M3 : Sequoia Version 15.5

Hey @rbaugh!

Is this happening for a specific site you’re working on? Or all sites? For example, if you spin up a new, blank Local site and start working on that does the same thing happen?

You may have seen our performance help guide before but just in case I’ll share it here: Troubleshoot: Performance Issues - Local

Were you using Xdebug @rbaugh? We also have another recent bug report here related to Xdebug crashes that could be related if so.

It happens with multiple sites I am developing with. Some are single instance sites and a couple are multisite. I haven’t tried a fresh install as I haven’t had time to try debugging and working on a fresh site.

I do try and limit the sites I have started and running in Local to just one at a time. Occasionally I may need more than one if I need to fix something, but try and limit it to just one running at a time.

I checked the console/crash reports and don’t see anything about php-fpm as mentioned with the xdebug. It hasn’t crashed or completely stopped, but it goes from pretty instant responses (< 30sec) to over minutes for a page load to happen even without a breakpoint hit. Just loading a page. Switching the PHP versions gets things back to working.

It doesn’t do it all of the time either. I left a site running over night and when I got on this morning, it seemed to be working ok. Other times, it can be a couple of min and the delay starts up. I’m using PHPStorm for IDE, but haven’t tried closing it and testing site performance. I have stopped the debugger listening on PHPStorm and it doesn’t make any change, just haven’t closed the app itself.

1 Like

Is this something that just started recently @rbaugh as in after you update to Local v9.2.8 or has it been going on longer back?

Could you share a full Local Log here? Retrieving Local’s Log File

@Nick-B It has been going on for a while. I had just recently upgraded to test and see if anything was different.

I’ll see if I can get some logs over today

1 Like

local-logs.zip (1.5 MB)

Here are my log files

@rbaugh I’m not really seeing anything in the logs that stands out but I’ll run by the Devs as well

It sounds like however there are some things that you could try to test at some point:

  • Testing a new, blank site to see if it runs into the same issues, which might help indicate if it’s a site-specific problem with the installs you’re working on or something else on your device.

  • Testing with PHPStorm for IDE shut down

For the installs you are working on, what kind of configurations are we looking at? A lot of plugins? Large DBs? Or simple static blogs?

You also mentioned that, I left a site running over night and when I got on this morning, it seemed to be working ok - Is that something you do often? Leave a site or sites up and running over night?

@Nick-B Quite often I am doing dev work all day long and when I get done for the day, I just get up and leave my laptop. Being remote, I just let things stay up in my own office.

I’ll have to try shutting down PHPStorm when I notice the site is slow to see if anything changes there. I feel like I had tried that at one point, but could be just imagining I had tried it.

As for the sites, I guess they are large DBs compared to a simple blog site, but could be smaller compared to others. We do have a decent amount of plugins on one site in particular, but another site I know has fewer plugins. Would have to check the count on each. I also need to check on another site that is smaller and see how it is handling.

I have another dev environment local to the system that I run at times and I don’t seem to run into this issue. It only seems to happen within LocalWP. The other is a nix shell container running an amp service. When running sites through here, I don’t seem to have the lag like I do when the sites are running through Local.

Thanks for all of the insight @rbaugh!

Quite often I am doing dev work all day long and when I get done for the day, I just get up and leave my laptop. Being remote, I just let things stay up in my own office.

I can understand getting into this habit (I too work remotely), but it might be beneficial to Stop any sites running, and close Local along with any programs you were using alongside at the end of the day. I used to have a similar problem when leaving stuff running overnight. Not related to Local, but just other programs on my device.

As for the sites, I guess they are large DBs compared to a simple blog site, but could be smaller compared to others. We do have a decent amount of plugins on one site in particular, but another site I know has fewer plugins. Would have to check the count on each. I also need to check on another site that is smaller and see how it is handling.

This sounds like it could be promising. For sites with a lot of plugins or larger DBs that could definitely lead to some sluggishness but as I mentioned before it will be more telling if it’s still happening for smaller or new installs as well. Obviously if it’s only happening on the bulky installs, then it could be site specific. If it’s happening across the board, then maybe it’s more related to Local’s interaction with your device, or another program.

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