rickyT
March 7, 2022, 9:48pm
1
Hello,
I’m attempting to update plugins on many child sites using the Dashboard.
This used to work fine, but now the process fails and all child sites become stuck in Maintenance Mode.
Is this a known issue with the latest versions of the Dashboard and MainWP Child plugins? It seemed to start happening after the move to PHP v8.0
After the plugin updates fail, the child sites return 503 (Service Unavailable) to the Dashboard, when previously they were running fine.
There’s nothing reported in the server logs on either the Dashboard or the child sites. Also, no new plugins have been installed on the Dashboard (e.g. security plugins).
Thanks
bogdan
(Bogdan Rapaić)
March 8, 2022, 12:52pm
2
Hi Ricky,
Does this happen on all your sites or just ones that are on PHP 8 servers?
Can you please enable Debug logging on one site and try to duplicate the issue and see if any error will be recorded.
rickyT
March 8, 2022, 1:20pm
3
Hi Bogdan,
Good question… All sites are on PHP 8 and they’re all failing with plugin updates. Dashboard sync works fine.
Nothing is showing in the debug logs either.
I just tried rolling back one of the child sites to PHP 7.4 and it started working again, so it’s definitely an issue with the PHP version.
Our sites are all running PHP 8.0.16 and the latest version of MainWP plugins.
Thanks
bogdan
(Bogdan Rapaić)
March 8, 2022, 5:48pm
4
Hi Ricky,
Can you please try this version and try to update one site:
Shared with Dropbox
rickyT
March 8, 2022, 7:24pm
5
Thanks Bogdan - unfortunately, the issue is still the same with that version of the Dashboard.
bogdan
(Bogdan Rapaić)
March 8, 2022, 7:47pm
6
Thanks for checking.
Can you try with this MainWP Child plugin version on the child site side?
Shared with Dropbox
rickyT
March 8, 2022, 8:57pm
7
Hi Bogdan - no luck with that either, unfortunately.
I have the Dashboard and one Child site using the plugins posted above.
I just noticed that when the plugin update fails from the Dashboard, I see a console log message “NOMAINWP”.
bogdan
(Bogdan Rapaić)
March 9, 2022, 5:54pm
8
Hi Ricky,
It looks like there is something killing the process. Can you confirm what is the PHP Max Execution time and PHP & WP Memory Limit on the child site?
rickyT
March 9, 2022, 7:44pm
9
max_execution_time = 3600
memory_limit = 512M
WP memory limit = 40MB
It’s worth noting that the plugin update fails within about 3-4 seconds.
bogdan
(Bogdan Rapaić)
March 10, 2022, 3:59pm
10
Hi Ricky,
it could be a problem with Memory. Can you try to increase the WP Memory Limit to at least 256M and see if that helps?
rickyT
March 15, 2022, 2:45pm
11
Seems like more of a PHP version issue to me… I’ll keep looking for answers.
bogdan
(Bogdan Rapaić)
March 15, 2022, 7:37pm
12
Hi Ricky,
could it be that some other plugin/theme is not PHP 8 ready on your child sites. What happens if you deactivate all plugins except for the MainWP Child on one site and try to run updates?
rickyT
March 15, 2022, 9:08pm
13
Here are the test results:
all plugins disabled except for MainWP Child… fails and locks the child site in maintenance mode
all plugins disabled except for MainWP Child and switched to default theme… also fails
tried updating the child site’s WP core from the dashboard (5.8.3 to 5.9.2) … also fails and puts child site into the core update lock state
rolled back to PHP 7.4 … everything works fine
Is there any way to capture the error that the Dashboard is receiving, or why the Dashboard stops the update process?
bogdan
(Bogdan Rapaić)
March 16, 2022, 12:52pm
14
Hi Ricky,
thanks for verifying that.
I have tried multiple times to duplicate this problem on our PHP 8 setups but I couldn’t.
Would you mind opening a private Help Desk ticket so we can collect some additional information & investigate further?
rickyT
March 16, 2022, 5:08pm
15
Hi Bogdan,
I spend several hours debugging this and it appears to be related to WPEngine.
The way that WordPress downloads and unzips plugins has changed slightly with PHP 8. Now, it seems to be incompatible with WPEngine’s platform settings and causes the update process to crash.
bogdan
(Bogdan Rapaić)
March 16, 2022, 5:10pm
16
Hi Ricky,
thanks for letting us know.
If you get more details about this problem or find a way to fix it, please let us know.
rickyT
March 20, 2022, 12:57pm
17
Hi Bogdan,
We may have found the issue…
It seems that when MainWP Dashboard initiates a plugin update, it sends the request to the MainWP Child plugin on each site.
The MainWP Child plugin starts by setting the Cron flag to ‘true’ at this line of code:
/mainwp-child/class/class-mainwp-child-updates.php:123
Eventually, the plugin update process gets handed over to WordPress Core and triggers these lines of code:
This means the disk_free_space() command is triggered, which behaves differently in PHP8 on some hosts. See these comments from WordPress developers: Upgrade/Install: Check if the `disk_free_space()` function exists bef… · WordPress/WordPress@ab263f9 · GitHub
It seems the workaround would be for the MainWP Child plugin to avoid using Cron for these update tasks.
bogdan
(Bogdan Rapaić)
March 21, 2022, 6:30pm
18
Hi Ricky,
thanks for sharing your finding.
I will make sure our dev team gets this and checks it as soon as possible.
bogdan
(Bogdan Rapaić)
March 23, 2022, 3:09pm
19
Hi Ricky,
we made some tweaks in the MainWP 4.2 Beta version to address this issue.
If you want you can test it with one or two sites to see if the problem gets solved.
bogdan
(Bogdan Rapaić)
March 23, 2022, 3:09pm
20
Hi Ricky,
we made some tweaks in the MainWP 4.2 Beta version to address this issue.
If you want you can test it with one or two sites to see if the problem gets solved.