Follow-up from https://lemmy.dbzer0.com/post/15792108

I’ve spent a ton of hours trying to troubleshoot why lemmy.dbzer0.com is falling behind lemmy.world in federation. We have a good idea where it’s going wrong, but we have no idea why.

The problem is that once I receive an apub sync from l.w and send the request to the lemmy backend, it takes about 1 second to process an apub sync, which is way too long (is should typically be < 100ms).

We had a look at the DB and it was somewhat slow due to syncing commits to disk. OK we disabled that, and now it’s much faster (and less safe but whatever) but the sync times have not improved at all.

I’ve also made a lot of tests to ensure the problem is not coming from my loadbalancers and I am certain I’ve removed them from the equation. The issue is somewhere within the lemmy docker stuff and/or the postgresql DB.

Unfortunately I’m relying solely on other admins help on matrix, and at this point I’m being asked to recompile lemmy from scratch or deploy my own docker container with more debug instructions. Neither of these is within my skillset, so I’m struggling to make progress on this.

In the meantime we’re falling further and further behind in the lemmy.world federation queue, (along with a lot of other instances). To clarify, the problem is not lemmy.world. It takes my instance the same time to receive apub syncs from every other server. It’s just that the other servers don’t have as much traffic so 1/s is enough to keep up. But lemmy.world has so much constant changes, 1/s is not nearly fast enough.

I’m continuing to dig on this as much as I can. But I won’t lie that I could use some help.

I’ll keep you all updated in this thread.

104 points
*

Final Update: Problem has been resolved by migrating my lemmy backend. We are currently catching up to lemmy.world, which should probably take all the next day. But the “distance” is reducing by hundreds of syncs per minute.

I will write a post-mortem soon

permalink
report
reply
28 points

permalink
report
parent
reply
22 points

HACKERPERSON-Energy. Hope you feel relieved now.

permalink
report
parent
reply
26 points

like you wouldn’t believe

permalink
report
parent
reply
9 points

Appreciate everything you do! Thanks

permalink
report
parent
reply
21 points

W admin

permalink
report
parent
reply
10 points

I’m interviewing for a job today that could drastically change my life. If I get it I’ll be setting aside some $ to help maintain this instance. Your work here and beyond (ex. AI horde) are incredible and I’m looking forward to helping

permalink
report
parent
reply
6 points

much appreciated mate!

permalink
report
parent
reply

Hell yeah!

permalink
report
parent
reply
6 points

congrats, as a self hoster myself, i understand the feeling of getting something up and running to your liking. It’s the best feeling.

permalink
report
parent
reply
5 points

Thank you for your continous work!

permalink
report
parent
reply
5 points

Thank you so much 🙏

permalink
report
parent
reply
4 points

Thanks a lot for putting the energy and time into fixing this.

permalink
report
parent
reply
2 points

@ticoombs@reddthat.com in case you missed it

permalink
report
parent
reply
36 points

Update: Most likely culprit here is the distance between my backend and my DB. I am now planning a migration. I’ll keep you posted

permalink
report
reply
29 points
*

Just reminding everyone that if you can’t contribute with coding knowledge, you can alternatively contribute with a donation through Ko-Fi. There is also an option for LiberaPay if you prefer that platform.

permalink
report
reply
28 points

Update: No appreciable change. I’ve now recompiled lemmy from scratch and added lemmy.world incoming apub federation to its own backend. Somehow that made the requests from LW 5x slower. This makes no sense…

I’ve tried tweaking the DB connection pool, with no appreciable effect to performance.

permalink
report
reply
6 points

Maybe this is a dumb question but is there any indication the server is cpu-, memory-, disk-, or network-bound?

permalink
report
parent
reply
24 points

Have you tried simply uninstalling and reinstalling?

I’ll see myself out…

permalink
report
reply
10 points

Imo we should make a brand new instance to start clean.

permalink
report
parent
reply
23 points

We will call it dbzer1.com, it will be much better with hookers and blackjack!

permalink
report
parent
reply
7 points

Why stop there, we could make a religion out of this!

permalink
report
parent
reply

/0

!div0@lemmy.dbzer0.com

Create post

Meta community. Discuss about this lemmy instance or lemmy in general.

Service Uptime view

Community stats

  • 181

    Monthly active users

  • 107

    Posts

  • 1.2K

    Comments

Community moderators