Problems with 5.9.8

Issue Summary

When I select PHP 8.0 the performance is slow. When looking in addons I cannot enable php 8.0 local lightning service, I try to enable it and restart local but it’s always off. Also I am unable to delete the addon image compression and this local lightning service after going back to php 7.4.1 even after restarting it’s still there.

Troubleshooting Questions

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

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

Replication

Install the latest version of local (5.9.8+5191) and try to delete addons and try using php 8.0.

System Details

  • Which version of Local is being used?

5.9.8+5191

  • What Operating System (OS) and OS version is being used?
    Windows 10 Home 10.0.18362

  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

I can confirm this is happening and I’m on Windows as well.

I don’t think this is the PHP layer issue, as Query Monitor reports page load in 1-2 seconds, but in reality it loads 20 seconds. So something else must be choking.

PS. I have to update Visual C++ to the latest in order the get PHP8 working, otherwise, it was giving 502 errors.

This addon comes bundled with Local, so you likely can’t delete it. Are you trying to delete it from the system file-browser, or are you trying to disable it for a site within Local?

Do you mean that the performance is fine after updating Visual C++, or it’s still slow, but that was needed in order to avoid the 502?

It’s interesting that Query Monitor is showing such a different page load than what you are actually seeing, which makes me wonder if it has something to do with the communication between nginx and PHP.

@Kubitomakita – does the performance improve if you enable localhost router mode from “Preferences > Advanced > Router Mode?”

Basically, this setting makes it so you are going through one less nginx process and communicating directly with the site.

Do you mean that the performance is fine after updating Visual C++, or it’s still slow, but that was needed in order to avoid the 502?

It was needed to avoid 502.

does the performance improve if you enable localhost router mode from “Preferences > Advanced > Router Mode?”

No, still the same.

Surprisingly this is happening to 2 of 3 sites I tested. The other one is working fine, maybe slightly slover, but still acceptable. Even though the slow ones are almost vanilla WP, and the one which is fast has a bloated database and multiple plugins installed.

I also started brand new site with same stack and… getting router 404 :man_shrugging: might be another issue

If you look at the sitefolder/logs/php/error.log file – do you see anything in particular with the sites that are having issues?

You might also take a look at the sitefolder/logs/nginx/ log files, and possibly Local’s router (which you can view at “Help > Reveal Local Router’s Log”

Hi there,

I’m having similar issues, also on Win10.
Local 5.9.8+5191

Pageload with 7.4.1: 200ms
Pageload with 8.0.0: 2500ms

I get a couple of Xdebug errors in the debug.log (see below)
It’s talking about timeouts, could it be the delay we are experiencing are couple of consecutive timeouts and retries?

Hope this helps solve it.

Thanks,
Ruud

[01-Feb-2021 12:19:29 UTC] Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: ::1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :frowning:
[01-Feb-2021 12:19:29 UTC] Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: ::1:9000 (from HTTP_X_FORWARDED_FOR HTTP header), localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :frowning:

This is likely because the PHP 8.0.0 lightning service has some incorrect settings and is not listening on port 9003 as xDebug 3.0 now requires.

Perhaps time for a lightning service update for PHP 8.0 @ben.turner?

2 Likes

Hi, I’m new to this forum and experienced the same 404 and 502 pages, I messed around and noticed these problems went away by restarting my PC, although I now have other issues, this version seems to be very buggy and no one will buy while it’s like this. I’ve wasted lots of time messing about trying to get the blueprints to be added to a new site but no luck at all. I wish admin would look into this. The sales guy on youtube seems very chatty but think they need to get this sorted ASAP as I know I’m not alone. Good luck with your problems, fingers crossed.

Hi afragen,

I followed your advice and added it to the php8.0.0.ini.hbs and the php.ini.hbs as well (it is not getting copied over it seems indeed).
The problem I found is that whenever switching the php.ini.hbs is getting ‘saved’ to the corresponding php version folders… so after a round of swaps, the php8.0.0.ini.hbs is again broken :sleepy:

@ben.turner => can you check in on this odd ini files copy/save behaviour?

Thanks,
Ruud

The file path for my php.ini.hbs file is /Users/afragen/Library/Application Support/Local Beta/lightning-services/php-8.0.0+1/conf/php.ini.hbs

When making the changes here, they copy over correctly when switching between PHP versions.

I can see how this is confusing. Currently, this is just how things are built. If you are wanting the configuration to be persistent like afragen mentions, you’ll need to edit the php.ini.hbs within Local’s configuration folder.

Here’s a screenshot to help visualize (though I don’t have PHP 8 installed right this second, the concept is similar)

One caveat to all of this is that editing that php.ini.hbs in Local’s configuration folder (ie, the source for the PHP service) will mean that it gets wiped out anytime that lightning service is updated.

I guess @afragen likes to live on the wild side, but on the other hand, I suppose if you aren’t just a little afraid of your tech stack, you aren’t going fast enough! :smiley:

1 Like

I’m really hoping that the pending update :wink: to PHP 8, and any of the other PHP versions that are built with xDebug 3.x, will have these edits included.

And yes, I break things :rofl: :innocent: but hopefully it makes stuff better in the long run.

1 Like

Hi @ben.turner

Thanks for sending me the information on the other location. I will have a look for sure.

Ruud

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