Ce sujet est résolu. Voici une description du problème et de la solution.
Problem: You are experiencing PHP fatal errors related to memory exhaustion on your website after upgrading to WPML. The errors occur inconsistently across different pages but only in the original language. Despite increasing the memory limit, the issue persists, suggesting a potential loop causing the memory exhaustion. Solution: First, try the following steps: 1. Navigate to WPML → Languages. 2. Locate the option **"Adjust IDs for multilingual functionality"** and disable it. 3. Save the changes to apply them. If the problem continues, implement this code snippet to modify the behavior of the Hummingbird plugin's persistent cache:
This code removes the 'terms' group from the cache, which might be contributing to the memory exhaustion.
If these solutions do not resolve the issue or seem outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum for further assistance.
Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.
Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.
Contexte de la question:
I am trying to upgrade our website lien caché with WPML instead of Weglot. We prepared this long in advance, with a staging server, and went live on Thursday, January 10th. We are hosted at WPMU. Link to a page where the issue can be seen: lien caché
Symptômes:
Since the upgrade, we are getting PHP fatal errors of exhausted memory, not consistently nor on the same webpages, but always on the original language, never on translated ones. The errors include: 'PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/web/site/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 133' and 'PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /var/web/site/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php on line 139'. After upgrading to a plan allowing 2048 MB, we still get the error: 'PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in /var/web/site/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 133'.
Questions:
Is there a sYou will notice that the memory allocation try is the same : 20480 bytes. In the first case we had 512 MB memory limit, now 2048MB.
It looks like there is a sort of loop somewhere?ort of loop causing the memory exhaustion?
That confirms WPML has an issue with object caching feature on servers, in the source language and when it’s configured without directory.
Of course the issue seems solved by disabling the object cache, but that is not really cool.
It seems WPML supports object caching since version 3.1.9 (2015). Since then some improvements and bug fixes have been regularly pushed in regards to object caching : https://wpml.org/fr//?s=object+cache
Is our issue is something you wish to escalate ? that would be greatly appreciated.
Les langues: Anglais (English )Allemand (Deutsch )Français (Français )
Fuseau horaire: Europe/Zagreb (GMT+02:00)
What if you enable caching again, disable the "Adjust IDs for multilingual functionality" option under WPML -> Languages, and observe the site for a few days?
In the meantime, we are trying to set up a WPMUDEV environment with the possibility of installing WPML and activating Object Cache Pro, so we can investigate this more thoroughly.
this line : [define( 'WPMUDEV_HOSTING_OBJECT_CACHE_ENABLED', false )] without PHP comments deactivate the WPMUDEV object cache, thus solves the issue. By commenting this line, the object caching is activated again