jointakahe / takahe

An ActivityPub/Fediverse server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stator: very frequent "Attempting transition on users.identity ... from state outdated"

futzle opened this issue · comments

I'm tailing the logs of the stator container and I see this over and over for the same two users.

2023-07-10T06:04:30.761040048Z Attempting transition on users.identity#201105306088347706 from state outdated
2023-07-10T06:04:31.258319821Z Attempting transition on users.identity#201101692635564730 from state outdated
2023-07-10T06:04:31.757747131Z Attempting transition on users.identity#201101560669714946 from state outdated
2023-07-10T06:04:34.312254459Z Attempting transition on users.identity#201101692635564730 from state outdated

The same two lines repeat literally every two or three seconds, and have been happening for an hour.

My questions:

  1. Am I DoSing my own instance with these repeated attempts to do ...something...?
  2. Am I DoSing another server with these repeated attempts?
  3. Does the stator back off the frequency of these attempts, and/or eventually give up? Or do I have to do something manual in the database?
  4. Why is this happening?

If I check one of these identities in the Django admin, the database says the record is "updated", not "outdated"! There are seven identities matching "outdated" on the database; they're for six different domains, some of which I know are up and running. Not all of these outdated identities are mentioned in the stator logs.

Since I started writing this issue a third identity has started appearing in the log.

Takahe 0.9.0 running as Docker image inside Debian 11 VM.

(Sorry if I shouldn't be asking this here; I don't have a Discord account.)

Hmm, that is rather unusual - it would imply that something is not bumping the "next time to look at this" timestamp like it should be.

Unfortunately, I rewrote the entire stator system last week to fix a menagerie of bugs like this, so there's not a whole lot of fixing I can do here after the fact, as we already have the big "fix" in place. It won't be DoSing your server - it's only a couple of database calls every few seconds, so I'd be inclined to just let it be for now and wait for the next release, unless you want to jump on the running-prerelease-code train.

It is trying to talk to the remote server every time that happens though.

Also, do try restarting the stator and seeing if that fixes it - this was a class of transaction/coroutine bug which was often fixed by that.

Thanks, I'll wait for the new improved stator and report a new issue if there is one.

For the record (and for anyone else trying to match this to their own experience), restarting the stator container does cancel these repeated attempts, so I think you're on the money about the cause.