您好,我正在使用 3.2.0.beta4-dev 版本(自托管),在此提交。更新后,用户开始在 UI 中收到重复/三倍的通知。(我指的是 Discourse UI,而不是电子邮件等)
即使您点击并阅读后,通知有时也会再次出现。我也遇到了这些问题。我不知道如何排查此问题或提供有用的日志。我想分享一下,看看这是否是一个普遍问题,或者仅存在于我的实例中?
您好,我正在使用 3.2.0.beta4-dev 版本(自托管),在此提交。更新后,用户开始在 UI 中收到重复/三倍的通知。(我指的是 Discourse UI,而不是电子邮件等)
即使您点击并阅读后,通知有时也会再次出现。我也遇到了这些问题。我不知道如何排查此问题或提供有用的日志。我想分享一下,看看这是否是一个普遍问题,或者仅存在于我的实例中?
我怀疑是内存问题,您的 Discourse 实例有多少内存?
我猜您指的是“Discourse UI”?
但是这个服务器已经运行了将近两个月了,这个问题以前没有出现过。现在我的服务器有 4GB 内存,其中一半是空的。2GB 的交换空间也空着。
我想可能是更新导致了这个问题,但也可能是扩展导致的。我不确定。我想下一步我会禁用所有扩展,看看是否有帮助。
是的,我在第一个帖子里包含了一张图片。我说的是 Discourse UI 通知。
我已经禁用了许多扩展程序,但问题仍然存在。有什么想法吗,或者我可以降级到 3.2.0.beta3-dev 版本吗?谢谢。
大家好,我知道没有人必须提供帮助,这是一个社区论坛,当然我不是付费客户,但这个错误让我和用户都感到非常沮丧。我们两个月前在 Discourse 的帮助下创建了一个社区,我们有 458 名活跃月用户。但自从这个错误发生(20 天前)以来,我已经尝试了我能做的一切。这对用户体验非常糟糕,现在我正在寻找脚本迁移到 Flarum 或其他论坛平台。看看这个:

用户一遍又一遍地收到相同的通知。他们会收到 20 天前、5 天前或任何时候的通知。即使您关闭了所有通知,几个小时后您仍然会收到相同的通知,而且没有办法解决这个问题!
再次,我知道我的处境,这是一个社区平台。我无权抱怨,但如果在这篇文章之后没有人提供帮助,即使这意味着我们所有以前的帖子和主题都将被删除(1.2 千个主题和 12.7 个帖子),我们也只能去别处了……
顺便说一句,我曾是 Discourse 的倡导者。我曾在我的 YouTube 频道上制作过关于它的视频。土耳其社区通常使用过时的论坛,我以前使用 Discourse 的经验很好,所以在开设自己的论坛后,我想让人们了解这个软件。
总之,我真的不想失去我们当前论坛上所有其他人的解决方案和工作。所以,我再次恳请您的帮助。谢谢。
出于好奇,你能找出那些有重复通知的帖子有什么共同之处吗?
据我所知,这因用户而异。但它们会重复。在我的账户上,我一遍又一遍地收到相同的通知。尽管这在 21 天前的帖子中没有发生,我们当时进行了 3.2.0beta4 更新,并且我还为我们的论坛添加了扩展。
起初我以为是扩展触发了这个问题,所以我禁用了所有扩展,但问题仍然存在。顺便说一句,也许我应该删除它们并完全重建?我不知道。
然后我以为是因为 beta4。然后我降级到 beta3,当时我们没有这个问题,但它仍然存在。
抱歉,我们没有收到其他关于此问题的报告,因此很难确定您网站上发生的情况。您是否进行了标准安装?
您的 /logs 或 /sidekiq 页面是否有任何可能提供更多信息的内容?
是的。禁用可能无法完全消除问题所在。但是您最近安装了哪些插件?我们或许可以知道是否有插件曾被报告有问题。
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):
As a theme component:
EDIT: I forgot to add couple more of them
我可能弄错了,但那是一个主题组件,对吧?
是的,没错,这在此时此刻是一个主题组件,我不知道是什么,所以还是把它包含进去了。![]()
Sidekiq 处理所有后台作业,包括通知。你的错误信息确实很杂乱
我认为其中一些错误已经被修复了,所以在你执行重建/更新后应该不会再出现。但我确实看到了:
Sidekiq 占用了太多内存(使用量:558.27M)
这可能会迫使它重试作业(包括再次发送通知)。你能点击那个错误看看是否有更多信息吗?
我明白了,如果真是这样,那可能就是问题所在。
![]()
左边是计数,对吧?所以它发生了 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
Su 7:32 am
Mo 1:12 pm
但问题是,我们有 4GB 的内存和 2GB 的 SWAP,我从未见过它使用超过这个量:
我刚刚拍的照片就是现在的样子。所以也许这发生在用户高峰期,如果不是这样,也许我需要提高 Sidekiq 的阈值?
信息:
Sidekiq 正在消耗过多内存(使用:558.27M)用于 'btt.community',正在重启
回溯:
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>'
环境:
hostname dc-app, [dc-discourse]
process_id 1215943
application_version a55f924e279b45b81e69e720faeb38284aed90d4
time Mo 1:12 pm
再次查看,我还看到一些可能与之相关的错误:
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'
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'
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 插件有关。正如我所说,我不是这方面的专家,但我会尝试从头开始删除并重新构建它们……
删除插件并重建后,第三个错误消失了,但第一个和第二个弃用通知仍然存在。
问题仍未解决。
在 sidekiq 中,我看到重试部分有数十个 Jobs::PostAlert。我猜这就是所有这些通知都回来的原因。但如果它实际上发送了警报,为什么它会进入重试呢?
正如你所看到的,有 63 页。我应该把它们都删除吗?
编辑:
从错误来看,它似乎是由 discourse-private-topics 和 discourse-follow 插件触发的。
即使我删除了它们,因为它们在重试部分,sidekiq 仍然发送那些通知。现在我清除了所有这些重试,我希望问题已经解决。我会更新它。
好的,问题解决了。最终的 Job exception: wrong number of arguments (given 0, expected 1) 问题是由以下一个或两个插件引起的:Private Topics Plugin 和 https://meta.discourse.org/t/discourse-follow/110579。也许两者结合起来会产生这个问题,我不知道,也不想去弄清楚。我在这里处理这个问题21天,有点受创伤了。😄 也许这个插件的作者想知道这个信息,所以我在这里标记他们:@sam @RGJ
我想我学会了如何调试 Discourse 问题,并且再也不会一次安装超过 1 个插件了……
感谢您对此事的深入调查!问题确实出在我的私有话题插件中,并且仅在关注插件也启用的情况下才会出现。
我已经推送了一个修复补丁。很抱歉给您带来了糟糕的体验 ![]()
出色的调试。
感谢 @RGJ 的快速修复 ![]()
由于这是一个非#official插件的问题,我将把它移出#bug类别(但不会将其合并到 https://meta.discourse.org/t/private-topics-plugin/268646,因为它对那个插件来说有点太大了)。
希望您现在可以同时安装这两个插件而不会收到任何通知。 ![]()