[Private Topics plugin] 読んだ後も通知が再び来る

こんにちは。私は3.2.0.beta4-devバージョン(セルフホスト)とこのコミットを使用しています。アップデート後、ユーザーがUIで二重/三重の通知を経験し始めています。(Discourse UIについて話しており、Eメールなどは対象外です。)

クリックして読んだ後でも、通知が時々戻ってきます。私もこれらの問題を抱えています。この問題をどのようにトラブルシューティングしたり、役立つログを提供したりすればよいかわかりません。これがグローバルな問題なのか、それとも私のインスタンスの問題なのか、共有したいと思いました。

RAMの問題だと思いますが、あなたのDiscourseインスタンスにはRAMがいくつ搭載されていますか?

「Discourse UI」のことでしょうか?

サーバーは2ヶ月近く稼働していますが、この問題は以前は発生していませんでした。現在、私のサーバーには4ギガバイトのRAMがあり、その半分は空いています。2ギガバイトのスワップも空いています。

アップデートが原因かもしれませんが、拡張機能が原因かもしれません。確信はありません。次のステップとして、すべての拡張機能を無効にして、問題が解決するかどうかを確認します。

はい、最初の投稿に画像を含めました。Discourse UIの通知のことです。

拡張機能をいくつか無効にしましたが、問題はまだ解決しません。何か考えはありますか、それとも 3.2.0.beta3-dev バージョンにダウングレードすることは可能ですか?よろしくお願いします。

こんにちは、またお会いできて嬉しいです。誰も助ける必要はなく、ここはコミュニティフォーラムであり、もちろん私は有料顧客ではありませんが、このバグは私とユーザーの両方にとって非常にイライラするものになっています。私たちはDiscourseのおかげで2ヶ月前にコミュニティを作成し、毎月458人のアクティブユーザーがいます。しかし、このバグが発生してから(20日前)以来、私はできる限りのことを試してきました。ユーザーエクスペリエンスにとって非常に悪いことであり、今ではFlarumや他のフォーラムプラットフォームに移行するためのスクリプトを探しています。これを見てください。

output

ユーザーは何度も何度も通知を受け取ります。20日前、5日前、あるいはいつでも通知を受け取ります。すべての通知を却下しても、数時間後に同じ通知が再び届き、修正する方法はありません!

繰り返しになりますが、私は自分の立場を理解しています。これはコミュニティプラットフォームです。文句を言う権利はありませんが、この投稿の後も誰も助けてくれなければ、これまでのすべての投稿とトピック(1,200のトピックと12,700の投稿)が削除されることになったとしても、私たちは別の場所に行かなければならなくなります…

ちなみに、私はDiscourseの支持者でした。YouTubeチャンネルでDiscourseに関する動画を作成しました。トルコのコミュニティは通常、古いフォーラムを使用しており、以前Discourseを使用した経験は素晴らしかったので、自分のフォーラムを開設した後、人々にこのソフトウェアを知ってもらいたいと思いました。

とにかく、他のすべての人の解決策と、現在のフォーラムでの作業を失いたくありません。そのため、再び助けを求めます。ありがとうございます。

繰り返しの通知が発生している投稿に共通点があるか、単に興味本位で調べていただけますか?

「いいね!」 1

理解している限りでは、ユーザーごとに異なります。しかし、繰り返されます。私のアカウントでは、同じ通知が何度も届きます。ただし、これは21日以上前の投稿では発生しません。これらの投稿については、アップデート 3.2.0beta4 を実施し、フォーラムに拡張機能を追加しました。

当初は拡張機能が原因だと思いましたが、すべての拡張機能を無効にしましたが、問題は解決しませんでした。ちなみに、拡張機能を削除して完全に再構築した方が良いでしょうか?わかりません。

その後、ベータ版4が原因だと思いましたが、問題が発生していなかったベータ版3にダウングレードしましたが、問題は依然として残っていました。

残念ながら、この問題に関する他の報告がないため、お客様のサイトで何が起こっているのかを特定するのは困難です。標準的なインストールをご利用ですか?

/logs または /sidekiq ページに、より多くの情報を提供するものはありますか?

はい。無効にしても問題のある部分が完全に削除されない場合があります。しかし、最近インストールしたプラグインは何ですか?問題が報告されているかどうかを確認できるかもしれません。

「いいね!」 2

Yes I understand it is hard to pinpoint. That’s why I hoped it would go away after a while but it didn’t.

I think I am having the same problem as this: Users getting notifictations from long ago

Yes I have a standart install but only difference is I am behind Cloudflare. You might think this is because of Cloudflare but before we didn’t had such issue. I don’t think it’s likely.

I couldn’t find anything related to notifications but I am not an expert on this so let me share a quick bit of it maybe your eyes will catch something

Warnings:


MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Failed to send push notification : WebPush::Unauthorized : host: fcm.googleapis.com, #<Net::HTTPForbidden 403 Forbidden readbody=true> body: the VAPID credentials in the authorization header do not co
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Failed to handle exception in exception app middleware : ArgumentError : Empty list of attributes passed
Failed to handle exception in exception app middleware : ArgumentError : Empty list of attributes passed
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
DiscoTOC theme/component is throwing errors: TypeError: Cannot read properties of null (reading 'en')
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Failed to handle exception in exception app middleware : ArgumentError : Empty list of attributes passed
Failed to send push notification : WebPush::Unauthorized : host: updates.push.services.mozilla.com, #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> body: {"code":401,"errno":109,"error":"Unaut
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Failed to handle exception in exception app middleware : ActiveRecord::RecordNotUnique : PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_topic_tags_on_topic_id_and_t
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Failed to process hijacked response correctly : EOFError : end of file reached
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
Deprecation notice: `SiteSetting.anonymous_posting_min_trust_level` has been deprecated. Please use `SiteSetting.anonymous_posting_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/disc
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
Failed to send push notification : WebPush::ResponseError : host: web.push.apple.com, #<Net::HTTPBadRequest 400 Bad Request readbody=true> body: {"reason":"VapidPkHashMismatch"}
discourse-gifs theme/component is throwing errors: TypeError: Cannot read properties of null (reading 'en')
DiscoTOC theme/component is throwing errors: TypeError: Cannot read properties of null (reading 'en')
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
Failed to send push notification : WebPush::Unauthorized : host: updates.push.services.mozilla.com, #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> body: {"code":401,"errno":109,"error":"Unaut
Sidekiq is consuming too much memory (using: 558.27M) for 'btt.community', restarting
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
Failed to send push notification : WebPush::PushServiceError : host: updates.push.services.mozilla.com, #<Net::HTTPBadGateway 502 Bad Gateway readbody=true> body: {"code":502,"errno":903,"error":"Bad
Deprecation notice: `SiteSetting.min_trust_level_for_here_mention` has been deprecated. Please use `SiteSetting.here_mention_allowed_groups` instead. (removal in Discourse 3.3) At /var/www/discourse/
Deprecation notice: Jobs::Chat::NotifyMentioned was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than t
Deprecation notice: Jobs::Chat::NotifyWatching was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than th
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb
MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb
Deprecation notice: Jobs::Chat::NotifyMentioned was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than t
Deprecation notice: Jobs::Chat::NotifyWatching was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than th

Errors:

Job exception: Net::ReadTimeout
Job exception: Net::ReadTimeout
Job exception: Net::SMTPAuthenticationError
Job exception: Net::SMTPAuthenticationError
Job exception: Net::SMTPAuthenticationError
(google_oauth2) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Job exception: Net::ReadTimeout
(github) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
(discord) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
default: Failed to pull hotlinked image (https://btt.community/uploads/default/optimized/2X/9/9394498c413ffd7cefbee2461a83d1a66b3b499c_2_690x388.jpeg) post: 10185 PG::UniqueViolation: ERROR: duplicat
Job exception: ERROR: duplicate key value violates unique constraint "pg_type_typname_nsp_index" DETAIL: Key (typname, typnamespace)=(gamification_leaderboard_cache_1_all_time_1, 2200) already exist
(google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, invalid_grant: Bad Request { "error": "invalid_grant", "error_description": "Bad Request" }
Job exception: Net::ReadTimeout
Job exception: end of file reached
(github) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
(twitter) Authentication failure! invalid_credentials: OAuth::Unauthorized, 401 Unauthorized
Job exception: Net::SMTPAuthenticationError
Job exception: end of file reached
(google_oauth2) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
(google_oauth2) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Job exception: Net::ReadTimeout
Job exception: wrong number of arguments (given 0, expected 1)
Job exception: end of file reached
Job exception: wrong number of arguments (given 0, expected 1)
(discord) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Job exception: Net::ReadTimeout
Job exception: wrong number of arguments (given 0, expected 1)

Fatal:

ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "categories" does not exist LINE 1: SELECT "categories"."id" FROM "categories" LEFT JOIN categor...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "user_auth_tokens" does not exist LINE 1: SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((...
Regexp::TimeoutError (regexp match timeout) lib/crawler_detection.rb:38:in `match?' lib/crawler_detection.rb:38:in `crawler?' lib/middleware/anonymous_cache.rb:129:in `is_crawler?' (eval):2:in `__comp
ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block ) lib/post_action_creator.rb:295:in `rescue in creat
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:522:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
NoMethodError (undefined method `title' for nil:NilClass) app/models/reviewable_queued_post.rb:166:in `perform_revise_and_reject_post' app/models/reviewable.rb:331:in `public_send' app/models/reviewab
ArgumentError (Empty list of attributes passed) lib/plugin/instance.rb:521:in `block in on' lib/discourse_event.rb:12:in `block in trigger' lib/discourse_event.rb:12:in `trigger' app/models/post_mover
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_topic_tags_on_topic_id_and_tag_id" DETAIL: Key (topic_id, tag_id)=(2907, 1) already e

For sidekiq I don’t know where to look exactly. Isn’t sidekiq handling e-mails? Does it have anything to do with notifications?

Okay I will try to uninstall every one of them and rebuild in the meantime.

Here are the extensions I installed before this problem started (it started the exact day):

  • Who’s Online
  • Cakeday
  • Signature
  • Adsense
  • ActivityPub (I deleted this completely and rebuilt since I couldnt disable this)

As a theme component:

  • GIF

EDIT: I forgot to add couple more of them

  • Discourse Private Topics
  • Discourse Force Moderation

私が間違っているかもしれませんが、それはテーマコンポーネントですよね?

はい、本当です。現時点ではテーマコンポーネントなので、何が何だかわからず、とにかく含めました。:grinning_face_with_smiling_eyes:

「いいね!」 1

Sidekiqは通知を含むすべてのバックグラウンドジョブを処理します。そこには雑多なエラーが含まれていますね :slight_smile: いくつかはすでに修正され、再構築/アップデート後に再発しないはずのものもあると思います。しかし、以下のようなものも見られます。

Sidekiqがメモリを過剰に消費しています(使用量:558.27M)

これは、ジョブ(通知の再送信を含む)をリトライさせている可能性があります。それをクリックして、さらに情報がないか確認していただけますか?

「いいね!」 2

なるほど、そういうことならそれが問題かもしれません。

左側はカウントですよね?つまり10回発生したということです。

発生したすべての時刻を以下に示します。

8 Sep 6:55 pm
25 Sep 9:44 pm
4 Oct 9:53 pm
10 Nov 2:26 am (問題は11月9日に開始しました)
11 Nov 11:37 am
11 Nov 1:37 pm
23 Nov 6:43 pm
25 Nov 6:59 pm
日 7:32 am
月 1:12 pm

しかし、問題は、RAMが4GB、SWAPが2GBあるのに、これ以上使用されているのを見たことがないことです。

そして、これは今撮った写真です。ユーザーがピーク時にいるときに発生するのでしょうか、それともそうでない場合は、Sidekiqのしきい値を上げる必要があるのでしょうか?

情報:

Sidekiq が 'btt.community' のために過剰なメモリ (使用量: 558.27M) を消費しているため、再起動します

バックトレース:

config/unicorn.conf.rb:164:in `check_sidekiq_heartbeat'
config/unicorn.conf.rb:244:in `master_sleep'
unicorn-6.1.0/lib/unicorn/http_server.rb:295:in `join'
unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `<main>'

環境:

ホスト名	dc-app, [dc-discourse]
プロセスID	1215943
アプリケーションバージョン	a55f924e279b45b81e69e720faeb38284aed90d4
時刻	月 1:12 pm

これは何も証明するものではないことは承知していますが、毎日数回同じエラーが発生しており[1]、OPが経験しているものと同様のことは私の環境では発生していません。


  1. 修正するには要求が高すぎ、費用がかかりすぎるように思われるため ↩︎

「いいね!」 2

もう一度確認したところ、これに関連する可能性のあるエラーもいくつか見つかりました。

1番目:

Message (109 copies reported)

Deprecation notice: Jobs::Chat::NotifyMentioned was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
At /var/www/discourse/plugins/chat/lib/chat/notifier.rb:355:in `notify_mentioned_users`

Backtrace

/var/www/discourse/lib/discourse.rb:1030:in `deprecate'
/var/www/discourse/app/jobs/base.rb:371:in `enqueue'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:355:in `notify_mentioned_users'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:78:in `notify_new'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:42:in `block in execute'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:7:in `execute'

2番目:

Message (109 copies reported)

Deprecation notice: Jobs::Chat::NotifyWatching was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
At /var/www/discourse/plugins/chat/lib/chat/notifier.rb:367:in `notify_watching_users`

Backtrace

/var/www/discourse/lib/discourse.rb:1030:in `deprecate'
/var/www/discourse/app/jobs/base.rb:371:in `enqueue'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:367:in `notify_watching_users'
/var/www/discourse/plugins/chat/lib/chat/notifier.rb:79:in `notify_new'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:42:in `block in execute'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:7:in `execute'

3番目:

Message (29888 copies reported)

Job exception: wrong number of arguments (given 0, expected 1)


Backtrace

/var/www/discourse/plugins/discourse-private-topics/plugin.rb:20:in `get_filtered_category_ids'
/var/www/discourse/plugins/discourse-private-topics/plugin.rb:149:in `handle'
/var/www/discourse/plugins/discourse-follow/plugin.rb:131:in `block (2 levels) in activate!'
/var/www/discourse/lib/plugin/instance.rb:521:in `block in on'
/var/www/discourse/lib/discourse_event.rb:12:in `block in trigger'
/usr/local/lib/ruby/3.2.0/set.rb:511:in `each_key'
/usr/local/lib/ruby/3.2.0/set.rb:511:in `each'
/var/www/discourse/lib/discourse_event.rb:12:in `trigger'
/var/www/discourse/app/services/post_alerter.rb:205:in `after_save_post'
/var/www/discourse/app/jobs/regular/post_alert.rb:10:in `execute'

hostname	dc-app
process_id	190
application_version	95b7cbd8a13ec82003936ef9408ec83bc9f3c2ea
current_db	default
current_hostname	btt.community
job	Jobs::PostAlert
problem_db	default
time	We 1:55 pm

3番目のエラーのバックトレースを見ると、discourse-private-topics プラグインと discourse-follow プラグインに関連しているようです。私はこれについては専門家ではありませんが、すべてを削除して最初から再構築してみます…

「いいね!」 1

プラグインを削除して再構築した後、3番目のエラーは解消されましたが、最初と2番目の非推奨通知は引き続き表示されます。

そして、問題は解決していません。

Sidekiqを見ると、リトライセクションに数十件の Jobs::PostAlert があります。これがすべての通知が戻ってくる理由だと思います。しかし、実際にアラートを送信するのであれば、なぜ最初にリトライに送られるのでしょうか?

ご覧の通り、63ページもあります。すべて削除すべきでしょうか?

編集:
エラーを見ると、discourse-private-topics および discourse-follow プラグインからトリガーされているようです。

それらを削除した後でも、リトライセクションにあったため、Sidekiqはそれらの通知を送信していました。現在、それらのリトライをすべて停止したので、問題が解決することを願っています。更新します。

「いいね!」 2

これで問題は解決しました。結局、Job exception: wrong number of arguments (given 0, expected 1) という問題は、Private Topics PluginDiscourse Follow のプラグインのいずれか、または両方が原因でした。両方が組み合わさってこの問題を引き起こしたのかもしれませんが、それは分かりませんし、知りたいとも思いません。この問題で21日間も苦しんできたので、少しトラウマになっています。:grinning_face_with_smiling_eyes: このプラグインの作者はこのことを知りたいかもしれないので、ここにタグ付けします: @sam @RGJ

@JammyDodger @Firepup650 ありがとうございます。

Discourseの問題のデバッグ方法と、一度に1つ以上のプラグインをインストールしないことを学びました。

「いいね!」 4

お忙しいところ、原因究明にご協力いただきありがとうございました。プライベートトピックプラグインの問題でしたが、フォロープラグインも有効になっている場合にのみ発生していました。

修正をプッシュしました。ご迷惑をおかけして申し訳ありませんでした :wink:

「いいね!」 3

素晴らしいデバッグです。:clap: :slight_smile: そして、迅速な修正をありがとうございます @RGJ :rocket:

これは非公式プラグインの問題だったので、バグカテゴリからは外します(ただし、少し大きすぎるため、Private Topics Plugin にはマージしません)。

これで、通知の興奮なしに両方のプラグインをインストールできるようになるはずです。:crossed_fingers:

「いいね!」 2