Local By Flywheel / LocalWP issues
Local By Flywheel, now called LocalWP, is a great product that makes it simple to create a local environment.
WP Synchro currently has a compatibility issue with LocalWP that can cause REST services to fail.
The issue is not in WP Synchro and can be reproduced with simple code without WP Synchro.
The problem comes when sending multiple HTTP requests.
The team behind LocalWP / Local By Flywheel has been informed about this bug, including how to reproduce
etc.
So hopefully a fix will be implemented soon.
Feel free to reach out to us or them to get the latest update on this issue.
Update 24/11/2021:
Version 1.7.0 included some changes to the WP Synchro health check so that it does not use more PHP workers than what is available in LocalWP. However, this is only a workaround in the health check for the still-existing bug in LocalWP.
The health check should therefore no longer show problems on macOS. The Linux version of LocalWP has never seemed to have the same problems.
There are still issues with LocalWP under Windows, caused by the NGINX and Apache configurations. For NGINX, the problem is simply that it does not work in a stable way under Windows with PHP and only spawns two PHP workers. For Apache as the web server with PHP and mod_fcgid, it more or less fails for every request other than the main request.
So there are almost certainly still bugs in LocalWP for Windows when doing multiple connections at the same time.
We have received user reports that a LocalWP update together with WP Synchro 1.7.0 on macOS now works as expected, which is good news. We have also completed a successful synchronization on macOS ourselves. Hopefully that is the case for everyone else as well. Please let us know if it is not.
So there has been some progress, but there are still problems under Windows. Hopefully they will address that in the near future. Fixing NGINX under Windows is probably not the right path here, as it lacks solid NGINX support together with PHP. So if you are listening, LocalWP: remove NGINX from the Windows version or make Apache the default and change the Apache configuration to mod_php instead of mod_fcgid. Finally, make sure enough workers are available.
Update 03/09/2021:
We did a lot of testing on LocalWP to determine what the problem is and how it could be fixed.
If it had been a bug in WP Synchro, we would have wanted to fix it, as a lot of people like LocalWP.
So our findings were these:
- Windows version of LocalWP:
- We could reproduce the issue, after spending a lot of hours on it, with simple code and without WP Synchro installed. That means it is not a bug in WP Synchro. The code was posted on their forums, but they could not reproduce it on macOS. There is a good reason for that.
- Essentially every other request sent to the web server failed, which is very strange, but that was the result.
- Mac OS version of LocalWP:
- On macOS, the health check failed with an error saying it could not connect to the REST service. This is caused by not having enough worker processes running in the background. What happens is that the health check code takes up one process, which in turn calls the REST service on the same site twice in succession, first to initiate and then to fetch master data, which also uses workers. At the same time, we had a timeout check that also occupied a PHP worker. That simply depleted the available processes, which was obviously far too low. This is not a problem for a normal web app that does not call itself multiple times like WP Synchro does.
- A similar issue is described here: https://community.localwp.com/t/increase-number-of-php-fastcgi-processes-to-serve-simultaneous-requests/24499
- Because macOS does not suffer from the same issue as Windows, where every other request fails, it otherwise works more or less as expected aside from the health check error. So making the health check gentler on worker processes is probably a workable workaround.
- Linux version of LocalWP:
- Everything seems to work well.
Still using free version? - Upgrade to PRO with 14 day free trial
PRO version makes it possible for you to migrate files between your sites and to
automatically make a database backup before migration.
You will get support for Basic Authentication and email notifications on success or failure. You also get access to priority support