mastodon.zunda.ninja is one of the many independent Mastodon servers you can use to participate in the fediverse.
Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.

Administered by:

Server stats:

1
active users

弊ぼっちは現在、

Pumaは
MAX_THREADS=6
WEB_CONCURRENCY=1

Sidekiqは
SIDEKIQ_THREADS=5

になってる。スレッド数をそれぞれ1減らしてからojとSidekiqを更新してみゆ。

まず

$ heroku config:set MAX_THREADS=5 SIDEKIQ_THREADS=4

スレッド数を減らして接続数が減ったのかよくわからないけどojのバージョンを上げていきます。

ojを更新してもトゥート受け取ってるじゃないのよもー

zunda

よーしお父さんsidekiqも上げちゃうぞー

配達できない問題のスタックトレースを記録できた!! やったあ!!! ActivityPub::DeliveryWorkerが例外を上げるとその後なんもできなくなるみたいです。なるほどなるほど。
https://gist.github.com/zunda/9623ec92de7c40a046afafa58633cc43

とりあえずslugをrollbackしておきました。

GistSidekiqを6.4.2から6.5.1に上げた時にruby-3.1.2のMastodonで見られる例外Sidekiqを6.4.2から6.5.1に上げた時にruby-3.1.2のMastodonで見られる例外 - log.txt

というわけでruby-3.1.2のMastodonでsidekiqを上げるとキューをさばかなくなる問題の再現にはタイムアウトするリモートも必要みたい。めんどーw とりあえず明日は例外をちゃんと読む。

nilになっている@callbackはlib/sidekiq/processor.rbで定義されていてProcessor.newに&blockで渡されているはず。Processor.newがあるのはlib/sidekiq/manager.rb。2ヶ所あって両方とも、Processor.new(@config, &method(:processor_result))と呼んでいる。第2引数の取り扱いがRubyのバージョンで違うのかな?テスト用のmainのMastodonでエラーの再現とRubyのバージョンの変更を試してみるね。

【悲報】Herokuアプリはweb dynoを起動しておかないでも503を返すのでトゥートを配達しようとしてもタイムアウトの例外が上がりませんw

app/lib/request.rbで必ず例外を上げるようにしたんだけどnomethoderrorにはたどりつかないな…

もしかしたら以前のsidekiqでキューしたタスクを再実行する必要があるのかな…

scout_apm-4.1.2/lib/scout_apm/background_job_integrations/sidekiq.rbのdef intall_processorあたりが問題っぽい。これじゃイニシャライザにblockを渡してないよね。

::Sidekiq::Processor.class_eval do
def initialize_with_scout(*args)
agent = ::ScoutApm::Agent.instance
agent.start
initialize_without_scout(*args)
end

alias_method :initialize_without_scout, :initialize
alias_method :initialize, :initialize_with_scout
end

scout_apmを新しくすればなおる気がする!!
https://github.com/scoutapp/scout_apm_ruby/issues/449

GitHubSidekiq 6.5 broken · Issue #449 · scoutapp/scout_apm_rubymperham/sidekiq#5375 Issue caused by monkey patch by this gem not passing block https://github.com/scoutapp/scout_apm_ruby/blob/v5.1.1/lib/scout_apm/background_job_integrations/sidekiq.rb#L39-L53 B...