"Trop de requêtes", "discourse_topic_id"

J’ai mis à jour WP-discourse vers la dernière version aujourd’hui et pour la première fois, j’ai commencé à voir ces erreurs :

[2025-05-29 13:22:11] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3886","wp_post_id":3151,"http_code":429} 
[2025-05-29 13:22:11] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3888","wp_post_id":3026,"http_code":429} 
[2025-05-29 13:22:11] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3889","wp_post_id":2374,"http_code":429} 
[2025-05-29 13:22:12] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3890","wp_post_id":2288,"http_code":429} 
[2025-05-29 13:22:12] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3891","wp_post_id":2083,"http_code":429} 
[2025-05-29 13:22:13] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3892","wp_post_id":2031,"http_code":429} 
[2025-05-29 13:22:14] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3894","wp_post_id":1495,"http_code":429} 
[2025-05-29 13:22:15] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3895","wp_post_id":975,"http_code":429} 
[2025-05-29 13:22:15] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3896","wp_post_id":841,"http_code":429} 
[2025-05-29 13:22:15] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"3897","wp_post_id":783,"http_code":429} 
[2025-05-29 13:22:15] comment.ERROR: sync_comments.response_error {"message":"Too Many Requests","discourse_topic_id":"4023","wp_post_id":730,"http_code":429} 

Des idées sur la cause ?

1 « J'aime »

L’explication la plus probable est celle indiquée dans le message d’erreur. Votre site envoie trop de requêtes au point de terminaison des commentaires de Discourse.

  • Les pages sur lesquelles les commentaires Discourse apparaissent sont-elles actualisées fréquemment ?
  • Votre site subit-il une charge plus importante que la normale ?
  • Les messages du journal continuent-ils ?
  • Utilisez-vous la fonctionnalité de mise en cache des commentaires WP Discourse ? Si ce n’est pas le cas, cela pourrait probablement aider ici. Vous pouvez activer la mise en cache des commentaires dans les paramètres.

J’ai pu revenir à la version précédente 2.5.6 et cela a complètement résolu le problème sans aucune autre modification :

image

Avec la version 2.5.7, la capture d’écran ci-dessous montrerait déconnecté à moins que je ne clique sur enregistrer à chaque fois sur cette page. Même dans ce cas, si je cliquais sur un autre onglet et revenais à la page principale du plugin, il indiquerait déconnecté à nouveau. Depuis que je suis revenu à la version 2.5.6, il indique TOUJOURS « Vous êtes connecté à Discourse ! » que je quitte cette page/onglet ou non.

J’ai trouvé cela étrange, mais j’ai pensé que c’était peut-être comme ça auparavant et que je ne l’avais pas remarqué, donc je n’ai pas la capture d’écran d’avant car je l’avais simplement ignorée. Après être revenu à la version 2.5.6, j’ai réalisé que ce n’était effectivement pas normal et que cela ne s’était produit qu’après la mise à niveau vers la version 2.5.7.

*** Les pages sur lesquelles les commentaires Discourse apparaissent sont-elles rafraîchies fréquemment ?**
(Je ne pense pas, rien n’a changé à part cliquer pour mettre à jour le plugin)

*** Votre site connaît-il une charge plus importante que la normale ?**
(non, même trafic que tous les jeudis)

*** Les messages de journal continuent-ils ?**
(Oui, ils continuaient, j’ai donc rétabli la version 2.5.6. J’ai pensé qu’avec le temps, cela se résoudrait, mais le journal a atteint environ 2 pages de longueur estimée.)

*** Utilisez-vous la fonctionnalité de mise en cache des commentaires de WP Discourse ? Sinon, cela pourrait probablement aider ici. Vous pouvez activer la mise en cache des commentaires dans les paramètres.**
(Non, je n’ai jamais eu à le faire. Aucun des paramètres de WP-Discourse n’a été modifié depuis environ un an. Ma seule action de maintenance a été de simplement mettre à jour vers de nouvelles versions.)

Je n’ai pas publié de nouveau contenu depuis la sauvegarde nocturne de WordPress ni mis à jour d’autres plugins, donc le retour arrière a été un moyen rapide de voir si cela résolvait le problème.

1 « J'aime »

Merci pour la réponse détaillée, j’apprécie !

Il semble que vous ayez fait un rollback de votre site entier ? Est-ce correct ? Êtes-vous absolument certain que la seule chose qui a changé est le plugin WP Discourse ? Si oui, qu’est-ce qui vous rend si sûr ? Comment la mise à niveau a-t-elle été effectuée ? Revenir à une version antérieure de votre site entier aurait également annulé toute autre modification apportée. De plus, utilisez-vous un thème activé pour les blocs, et utilisez-vous le bloc de commentaires WP Discourse ?

1 « J'aime »

La seule chose à laquelle je peux penser est ce bloc dans functions.php peut-être ?

add_filter( 'discourse_comment_html', function () {
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line length 120
					// line

Cela ne devrait pas causer ce comportement.

J’ai re-testé la version 2.5.7 sur plusieurs instances et je ne parviens pas à reproduire ce comportement. De plus, j’ai du mal à voir comment les modifications apportées à cette version pourraient causer quelque chose comme ça.

Nous venons de publier la version 2.5.8. Pourriez-vous mettre à jour uniquement le plugin, rien d’autre, et voir si le problème se reproduit ?

1 « J'aime »

Ok, je ferai ça ce week-end.

1 « J'aime »

J’ai tout mis à niveau hier et aucun problème jusqu’à présent.

1 « J'aime »

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.