Sauter la navigation

Ce sujet est résolu. Voici une description du problème et de la solution.

Problème :
Le serveur monte en charge fortement, utilisant intensivement MySQL, ce qui provoque le reboot du service. Les requêtes MySQL sont nombreuses malgré un faible trafic Apache, et cela semble lié à WPML.
Solution :
1. Vérifiez la version de PHP : Assurez-vous que tous les serveurs sont mis à jour vers au moins PHP 7, car la référence à "https://cdn.wpml.org/.fpm/php5.external" suggère qu'un des serveurs utilise encore PHP 5.
2. Examinez le problème avec le plugin GFML : Traitez le problème spécifique lié au plugin GFML en consultant la documentation ici : https://wpml.org/fr/forums/topic/gravity-forms-multilingual-plugin/#post-15898509
3. Envoyez-nous la requête SQL complète qui se produit lorsque le serveur reboot pour une analyse plus approfondie.

Si cette solution ne résout pas votre problème ou semble dépassée, nous vous recommandons de vérifier les problèmes connus sur https://wpml.org/known-issues/, de vérifier la version du correctif permanent et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support sur notre forum de support.

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum French. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Marqué : 

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par Bruno Kos Il y a 2 mois.

Assisté par: Bruno Kos.

Auteur Articles
juillet 18, 2024 à 6:35 am #15970021

ludovicE-3

Contexte de la question:
Nous avons sur un Cloud manager de Infomaniak un WordPress avec WPML. Occasionnellement, ce serveur monte en charge très fortement, montant à un usage de 16,20 voir même plus cœur du serveur. Cela provoque le reboot du service. Nous avons reçu un mail de la part de l'hébergeur avec pour information que cela provient d'un usage intensif de mysql. Cela semblerait provenir de WPML, sans certitude.

Symptômes:
Ce serveur fait énormément de requêtes mysql malgré un trafic au niveau d'Apache qui est très faible. Cela entraîne une forte charge cpu/ram du cloud.

Exemple de requete :

FROM wp_1041839_posts JOIN wp_1041839_icl_translations wpml_translations
ON wp_1041839_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wp_1041839_posts.post_type) LEFT JOIN wp_1041839_wc_product_meta_lookup wc_product_meta_lookup ON wp_1041839_posts.ID = wc_product_meta_lookup.product_id
WHERE 1=1 AND (
(
SELECT COUNT(1)
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (10208)
AND object_id = wp_1041839_posts.ID
) = 1
AND
(
SELECT COUNT(1)
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (3448)
AND object_id = wp_1041839_posts.ID
) = 1
AND
(
SELECT COUNT(1)
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (4446)
AND object_id = wp_1041839_posts.ID
) = 1
AND
(
SELECT COUNT(1)
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (4483)
AND object_id = wp_1041839_posts.ID
) = 1
AND
(
SELECT COUNT(1)
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (4505,4506)
AND object_id = wp_1041839_posts.ID
) = 2
AND
wp_1041839_posts.ID NOT IN (
SELECT object_id
FROM wp_1041839_term_relationships
WHERE term_taxonomy_id IN (11)
)
) AND ((wp_1041839_posts.post_type = 'product' AND (wp_1041839_posts.post_status = 'publish'))) AND ( ( ( wpml_translations.language_code = 'fr' OR (
wpml_translations.language_code = 'fr'
AND wp_1041839_posts.post_type IN ( 'e-landing-page','elementor_library','product' )
AND ( (
( SELECT COUNT(element_id)
FROM wp_1041839_icl_translations
WHERE trid = wpml_translations.trid
AND language_code = 'fr'
) = 0
) OR (
( SELECT COUNT(element_id)
FROM wp_1041839_icl_translations t2
JOIN wp_1041839_posts p ON p.id = t2.element_id
WHERE t2.trid = wpml_translations.trid
AND t2.language_code = 'fr'
AND (
p.post_status = 'publish' OR p.post_status = 'private' OR
( p.post_type='attachment' AND p.post_status = 'inherit' )
)
) = 0 ) )
) ) AND wp_1041839_posts.post_type IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','e-landing-page','elementor_library','cms_block','woodmart_slide','product','product_variation' ) ) OR wp_1041839_posts.post_type NOT IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','e-landing-page','elementor_library','cms_block','woodmart_slide','product','product_variation' ) )
GROUP BY wp_1041839_posts.ID
ORDER BY wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC
LIMIT 0, 24 | 0.000 |
| 1489531 | kv98e_WP1041839 | od-1813d8.ch3.infomaniak.ch:38110 | kv98e_WP1041839 | Sleep | 0 | |

Questions:
Pourriez-vous avoir des idées sur la cause de l'usage intensif de mysql ?

juillet 18, 2024 à 7:23 am #15970455

ludovicE-3

Durant un des piques de charge, voici le genre de messages que j'ai dans les error log apache :

lien caché [Thu Jul 18 06:31:54.413838 2024] [-:warn] [pid 29345:tid 139813927708416] [client 128.65.196.118:0] FastCGI: too much stderr received from server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external", increase FCGI_SERVER_MAX_STDERR_LINE_LEN (1023) and rebuild or use "\\n" to terminate lines
lien caché [Thu Jul 18 06:31:54.481444 2024] [fastcgi:error] [pid 29345:tid 139813927708416] [client 128.65.196.118:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861
lien caché [Thu Jul 18 06:32:15.050656 2024] [-:error] [pid 30772:tid 139814176950016] [client 40.77.167.20:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP
lien caché [Thu Jul 18 06:32:15.050681 2024] [-:warn] [pid 30772:tid 139814176950016] [client 40.77.167.20:0] FastCGI: too much stderr received from server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external", increase FCGI_SERVER_MAX_STDERR_LINE_LEN (1023) and rebuild or use "\\n" to terminate lines
lien caché [Thu Jul 18 06:32:15.147510 2024] [fastcgi:error] [pid 30772:tid 139814176950016] [client 40.77.167.20:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861
lien caché [Thu Jul 18 06:33:07.248904 2024] [-:error] [pid 30772:tid 139813910923008] [client 128.65.196.118:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP
lien caché [Thu Jul 18 06:33:07.248940 2024] [-:warn] [pid 30772:tid 139813910923008] [client 128.65.196.118:0] FastCGI: too much stderr received from server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external", increase FCGI_SERVER_MAX_STDERR_LINE_LEN (1023) and rebuild or use "\\n" to terminate lines
lien caché [Thu Jul 18 06:33:07.406650 2024] [fastcgi:error] [pid 30772:tid 139813910923008] [client 128.65.196.118:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861
lien caché [Thu Jul 18 06:33:37.102914 2024] [-:error] [pid 28990:tid 139813986457344] [client 128.65.196.118:0] FastCGI: server "https://cdn.wpml.org/home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/.config/apache/www.enforzia.com/.fpm/php5.external" stderr: PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /home/clients/0c43301e313d3e3aa567e6f4b2dc08eb/sites/enforzia.com/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php on line 861PHP

juillet 18, 2024 à 12:58 pm #15972666

Bruno Kos
Supporter

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

Pouvez-vous essayer les actions suivantes:

1. **Vérifier la version de PHP :**
Vérifiez la version de PHP sur tous les serveurs du cluster. Assurez-vous que tous les serveurs sont mis à jour vers au moins PHP 7. La référence à "https://cdn.wpml.org/.fpm/php5.external" suggère qu'un des serveurs utilise encore PHP 5.

2. **Examiner le problème avec le plugin GFML :**
Traitez le problème spécifique lié au plugin GFML: https://wpml.org/fr/forums/topic/gravity-forms-multilingual-plugin/#post-15898509

3. Pouvez-vous également nous envoyer la requête SQL complète qui se produit lorsque le serveur reboot? Il semble que ce ne soit qu'une partie de la requête.

juillet 18, 2024 à 2:55 pm #15973235

ludovicE-3

Merci pour votre réponse.

1. nous sommes en PHP 8.1 pourtant.

2. j'ai fais une manipulation, je surveille les logs jusqu'à demain.

3. J'ai fais une demande, car je n'ai pas accès à ceci.

juillet 19, 2024 à 5:55 am #15975932

Bruno Kos
Supporter

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

D'accord, faites-nous part de vos conclusions. Car pour le moment, nous n'avons pas d'autres idées.

Ce ticket est maintenant fermé. Si vous êtes un client de WPML et que vous avez besoin d'aide, veuillez ouvrir un nouveau ticket d'assistance