Debug KBin Messengers

For 1h my instance is hammered at 100% CPU. I just upscaled, but that didn't change anything. I now have a hetzner server with 4 cores and 4 processes for each of the messenger commands. I figured they just have to process a long queue so that makes sense, but only if the queue has an end...
The only thing I found to debug what the messengers are doing is this: php bin/console messenger:stats
which yields the same result each time I run it:

----------- -------
 Transport   Count
----------- -------
 async       100
 async_ap    100
 failed      2152
----------- -------

! [NOTE] Unable to get message count for the following transports: "sync".

Is there a better way to debug kbin messengers?

an output of the htop command
BentiGorlich,
@BentiGorlich@thebrainbin.org avatar

The solution was as dumb as can be: there was an illegal character in my JWT token: -. After setting a new JWT token without special chars it is working as expected

maskapony,

Ok, but messenger processes still operate in your PHP-fpm limits. The message queue only processes within those limits too, so you need to look at your fpm processes, see what the CPU / memory usage per process is like and then set the max accordingly.

BentiGorlich,
@BentiGorlich@thebrainbin.org avatar

This post is kindof outdated, because when I created it federation kinda didn't work, because mercure threw a bunch of errors when kbin tried consuming messages. This topic continues in the matrix chat if anyone is interested

maskapony,

You're better off using htop to look at the actual processes running.

PHP-fpm had a memory per process setting and a few settings to control how many new processes can be spawned. You need to tweak this so that the CPU doesn't hot 100%, I normally aim for a max of 90% but an average of around 50.

BentiGorlich,
@BentiGorlich@thebrainbin.org avatar

well htop didn't help in my case, because the problem was that the messenger processes got recreated really fast, because they crashed

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinMeta
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines