Hi, I have my site setup on a Plesk server. There's a duplicate of the site on the same sever for staging purposes. The WordPress tool in Plesk allows you to copy database and files between the two copies of the same site. The setup used to work fine with Toolset plugins running until recently when I upgraded the server with PHP 8x. Under PHP 8 when running data copy using the tool described above, I get PHP error. When I turn Toolset off, the operation works fine. Below are the error messages generated by the server:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10485760 bytes) in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/wp-views/application/models/shortcode/post/excerpt_gui.php on line 89
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10485760 bytes) in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/wp-views/application/models/shortcode/post/excerpt_gui.php on line 8
timeout: the monitored command dumped core
Segmentation fault
-
Those are out-of-memory errors, it looks like there is insufficient memory available to one of your sites.
The debug info you shared shows that the site you took that from has 256Mb of memory available, but the error shows that only 128M is available (and that is not enough), presumably that refers to the other site.
You should revise how much memory is available from the server PHP settings (you can check that using the info tab at Tools > Site Health), and how much is allocated to WordPress via the WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT settings in wp-config.php.
I allocated more server memory equally for the two sites, and the copying operation seems to be stable now with no errors. The remaining mystery is that why Toolset Views causes this memory insufficiency as other plugins seem to be fine with the original settings? Could it be that some parts of the code require a bit more calculation or interpretation hence more processing power needed during data copying operation? I want to understand the nature of the problem a bit more beyond the fix.
Thanks for the update and glad that the copying operation is functioning stable now.
It will be difficult to pinpoint the exact cause of this memory exhaustion, without first understanding the inner working of this copying mechanism.
In terms of code, the Toolset Views/Blocks is a fairly large and complex plugin since it consists of many components. But that complexity shouldn't be consuming too much memory just for the file copying/moving operations. I suspect that this copying mechanism could be in some way, analyzing/processing the code involved in the files too, which is the only explanation that I can think of for this increase in memory usage.