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 de WPML répond aux messages du forum 6 jours sur 7, 22 heures sur 24.

Mots-clés : 

This topic contains 3 réponses, has 2 participants.

Last updated by Jamal il y a 1 mois et 3 semaines.

Assigned support staff: Jamal.

Auteur Messages
septembre 19, 2019 à 1:47 #4605591

Vincent

Bonjour,

Mon serveur plante parfois quand j'utilise le site, et voici l'erreur que j'ai au niveau des logs qui concernant WPML

La requête SQL précédent mentionnée, et que vous trouverez ci-dessous, est présente en double depuis plus de 4000 secondes:

| 145751 | evenements | localhost | evenements | Query | 4177 | statistics | SELECT SQL_CALC_FOUND_ROWS wevenp_posts.ID FROM wevenp_posts JOIN wevenp_icl_translations wpml_translations
ON wevenp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wevenp_posts.post_type) WHERE 1=1 AND wevenp_posts.post_type = 'post' AND (wevenp_posts.post_status = 'publish' OR wevenp_posts.post_status = 'private') AND ( ( ( wpml_translations.language_code = 'fr' OR 0 ) AND wevenp_posts.post_type IN ('post','page','attachment','wp_block','mc4wp-form','place','event' ) ) OR wevenp_posts.post_type NOT IN ('post','page','attachment','wp_block','mc4wp-form','place','event' ) ) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='post_city_id' and (wevenp_postmeta.meta_value like "%,1,%" or wevenp_postmeta.meta_value like "1,%" or wevenp_postmeta.meta_value like "%,1" or wevenp_postmeta.meta_value like "1") )) AND (wevenp_posts.post_title like "%Ouverture%" ) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='geo_address' and (wevenp_postmeta.meta_value like "%1 rue jeanne d\'arc, Compiegne%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='geo_latitude' and (wevenp_postmeta.meta_value like "%49.4184679%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='geo_longitude' and (wevenp_postmeta.meta_value like "%2.822442599999931%" ))) AND (wevenp_posts.post_content like "%<p>rgqerg qer grqe</p>%" ) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='excerpt' and (wevenp_postmeta.meta_value like "%<p>g qre gqer</p>%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='st_date' and (wevenp_postmeta.meta_value like "%2019-09-11%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='st_time' and (wevenp_postmeta.meta_value like "%10H%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='end_date' and (wevenp_postmeta.meta_value like "%2019-09-27%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='end_time' and (wevenp_postmeta.meta_value like "%18h%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='contact' and (wevenp_postmeta.meta_value like "%000000000%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='email' and (wevenp_postmeta.meta_value like "%vincent@agencepeach.fr%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='website' and (wevenp_postmeta.meta_value like "%//agencepeach.fr%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='reg_desc' and (wevenp_postmeta.meta_value like "%<p>dfgqdgqdgfd</p>%" ))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key='reg_fees' and (wevenp_postmeta.meta_value like "%10€%" ))) ORDER BY (select distinct wevenp_postmeta.meta_value from wevenp_postmeta where wevenp_postmeta.post_id=wevenp_posts.ID and wevenp_postmeta.meta_key like "home_featured_type") asc,wevenp_posts.ID DESC LIMIT 0, 8

Ces deux requêtes monopolisent les ressources CPU/RAM de votre serveur et bloquent en partie le traitement des requêtes HTTP.

septembre 19, 2019 à 4:05 #4607149

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Bonjour,

Merci d'avoir contacter l'assistance WPML. Je serais heureux de pouvoir vous aider.

Je pense que cette requête a été générée par une page qui gère/affiche des places ou des évènements. Comme vous pouvez le constater sur la requête il y a des conditions sur plusieurs metadata comme (geo_address, geo_latitude, geo_longitude, , st_time, end_date, end_time, contact, email, website).

Je suggère de demander à votre hébèrgeur d'arréter les requêtes SQL qui prennent beaucoup de temps.
Et je suggère de passer les configurations de votre thème pour vérifier si les champs cités en haut ne sont pas requises pour toutes les recherches.

Si vous pouviez aussi nous dire quelles pages spécialement créent ces requêtes aussi longues, ça nous aiderait à comprendre le problème.

Cordialement,
Jamal
Assistance WPML

septembre 23, 2019 à 2:36 #4625065

Vincent

Bonjour,

Si je désactive WPML tout fonctionne.
Le support m'indique que ce n'est pas la faute du thème car il fonctionne bien sans WPML
Je suis coincé

Voici l'erreur mysql

The above mentioned SQL query, which you will find below, has been duplicated for more than 4000 seconds:

| 145751 | events | localhost | events | Query | 4177 | statistics | SELECT SQL_CALC_FOUND_ROWS wevenp_posts.ID FROM wevenp_posts JOIN wevenp_icl_translations wpml_translations
ON wevenp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT ('post_', wevenp_posts.post_type) WHERE 1 = 1 AND wevenp_posts.post_type = 'post' AND (wevenp_posts.post_status = 'publish' OR wevenp_posts.post_status = 'private') AND (((wpml_translations .language_code = 'en' OR 0) AND wevenp_posts.post_type IN ('post', 'page', 'attachment', 'wp_block', 'mc4wp-form', 'place', 'event')) OR wevenp_posts.post_type NOT IN ('post', 'page', 'attachment', 'wp_block', 'mc4wp-form', 'place', 'event')) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta. meta_key = 'post_city_id' and (wevenp_postmeta.meta_value like "%, 1,%" or wevenp_postmeta.meta_value like "1,%" or wevenp_postmeta.meta_value like "%, 1" or wevenp_postmeta.meta_value like "1"))) AND (wevenp_posts.post_title like "% Opening%") AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'geo_address' and (wevenp_postmeta.meta_value like "% 1 rue jeanne d \' arc, Compie gne% "))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'geo_latitude' and (wevenp_postmeta.meta_value like"% 49.4184679% "))) AND (wevenp_posts.ID in (select wevenp_postmeta .post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'geo_longitude' and (wevenp_postmeta.meta_value like "% 2.822442599999931%"))) AND (wevenp_posts.post_content like "% <p> rgqerg qer grqe </ p>%") AND (wevenp_posts .ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'excerpt' and (wevenp_postmeta.meta_value like "% <p> g qre gqer </ p>%"))) AND (wevenp_posts.ID in (select wevenp_postmeta .post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'st_date' and (wevenp_postmeta.meta_value like "% 2019-09-11%"))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'st_time 'and (wevenp_postmeta.meta_value like "% 10H%"))) AND (wevenp_posts.ID in (select weven p_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'end_date' and (wevenp_postmeta.meta_value like "% 2019-09-27%"))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = ' end_time 'and (wevenp_postmeta.meta_value like "% 18h%"))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key =' contact 'and (wevenp_postmeta.meta_value like "% 000000000%")) ) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'email' and (wevenp_postmeta.meta_value like "%vincent@agencepeach.fr%"))) AND (wevenp_posts.ID in (select wevenp_postmeta. post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'website' and (wevenp_postmeta.meta_value like "% // agencepeach.fr%"))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'reg_desc' and (wevenp_postmeta.meta_value like " % <p> dfgqdgqdgfd </ p>% "))) AND (wevenp_posts.ID in (select wevenp_postmeta.post_id from wevenp_postmeta where wevenp_postmeta.meta_key = 'reg_fees' and (wevenp_postmeta.meta_value like"% 10 €% "))) ORDER BY (select distinct wevenp_postmeta.meta_value from wevenp_postmeta where wevenp_postmeta.post_id = wevenp_posts.ID and wevenp_postmeta.meta_key like "home_featured_type") asc, wevenp_posts.ID DESC LIMIT 0, 8
Envoyer des commentaires

septembre 24, 2019 à 12:35 #4631563

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Bonjour,

Je comprends votre position. Nous ferons le necessaire pour que cela fonctionne aussi avec WPML.

J'aurais besoin de savoir quelles pages spécialement créent ces requêtes aussi longues, ça nous aiderait à comprendre le problème mieux.

J'aimerais aussi pouvoir accéder à votre site et vérifier les options du thème plus profondèment. J'ai activé l'espace privé pour partager les accès à votre site en toute sécurité.

Cordialement,
Jamal

Le sujet ‘[Fermé] error’ est fermé à de nouvelles réponses.