I’m trying to fix this annoying slowness when posting to larger communities. (Just try replying here…) I’ll be doing some restarts of the docker stack and nginx.

Sorry for the inconvenience.

Edit: Well I’ve changed the nginx from running in a docker container to running on the host, but that hasn’t solved the posting slowness…

6 points

Since I have you here, if I start my own instance do I absolutely have to use docker? I’ve never had good experiences with it and would rather just install programs the old-fashioned way

permalink
report
reply
2 points

Well if they can create a docker image out of it, you should be able to install it on a VM… but I run it in Docker because it makes everything so easy manageable…

permalink
report
parent
reply
2 points

It is possible to do it without docker… but nobody recommends it :)

permalink
report
parent
reply
1 point

There is a how-to on how to set up your own instance without docker using ansible: https://join-lemmy.org/docs/en/administration/install_ansible.html

permalink
report
parent
reply
5 points
*

Note that this is just basically a script to deploy lemmy on a remote server. And it uses docker. It just does it for you. (Mostly)

permalink
report
parent
reply
4 points

Oh, oof. Didn’t look into it much further as the docker solution would have suited me best also. Thanks for the heads-up

permalink
report
parent
reply
1 point

This is also only for Debian AFAIK

permalink
report
parent
reply
2 points

Technically no, but they put all their update info and support for docker.

permalink
report
parent
reply
6 points
*

Docker is not necessary, lemm.ee for example is running without docker!

Here is documentation for setting it up: https://join-lemmy.org/docs/en/administration/from_scratch.html

Of course you can fully adapt it to your own use case. The Lemmy backend is a single binary, you don’t even need to build it on the same machine which will run it. There’s no hard requirement to use nginx or anything like that either - if you understand what this guide is doing, you can replace all the unimportant parts as needed.

permalink
report
parent
reply
0 points

Interesting, thanks for posting

permalink
report
parent
reply
2 points

Awesome!!! Gonna work on it this weekend. Thank you!

permalink
report
parent
reply
4 points

Thanks for your work on this server!

permalink
report
reply
13 points

2 restarts done already :-)

permalink
report
reply
7 points

Hmm. I guess the delay in posting is not related to nginx. I now have the same conf as a server that doesn’t have this issue.

permalink
report
parent
reply
3 points

I’m only familiar with the high-level Lemmy architecture, but could it be related to database indices being rebuilt?

permalink
report
parent
reply
3 points

Any progress on this. I’ve been thinking about it too. Couple of ideas:

Too many indexes needing to update when an insert occurs?

Are there any triggers running upon insert?

Unlikely but there isn’t a disk write bottleneck? Might be worth running some benchmarks from the VM shell.

permalink
report
reply
1 point

Another thought: how many db connections do you have? Could it be starved because there are so many selects happening and it needs to wait for them to finish first?

permalink
report
parent
reply
5 points

I was thinking that as well, it’s like the post gets “checked” or something like that and that gives a timeout of 20secs. It could be an api or database but somehow my spidey sense says this could well be in code. Some extra calls to filter things maybe? Using an external server? Or even the propagation to the others? (Idk how this federation thing connects to the others, could be just that; maybe another server that is the bottleneck) I just found the 20 seconds suspicious given that is the default timeout

permalink
report
parent
reply
2 points

Didn’t know about the timeout but that makes sense. Would be easy to test by changing the nginx timeout.

permalink
report
parent
reply
12 points

Hehe, the joys of troubleshooting and profiling. Isn’t it fun?

permalink
report
reply
17 points

Hmm if it takes too long the fun disappears… ;-)

permalink
report
parent
reply
14 points

You got this. <3
I don’t have experience scaling Lemmy, but I do have experience scaling stuff in general. I’m sure you’ve got a few people here who’d be willing to talk things through with you if you get too frustrated.
And don’t forget to breathe and step back if you have to. Your well being is more important.

permalink
report
parent
reply

Lemmy.World Announcements

!lemmyworld@lemmy.world

Create post

This Community is intended for posts about the Lemmy.world server by the admins.

Follow us for server news 🐘

Outages 🔥

https://status.lemmy.world

For support with issues at Lemmy.world, go to the Lemmy.world Support community.

Support e-mail

Any support requests are best sent to info@lemmy.world e-mail.

Report contact

Donations 💗

If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.

If you can, please use / switch to Ko-Fi, it has the lowest fees for us

Join the team

Community stats

  • 3.1K

    Monthly active users

  • 804

    Posts

  • 37K

    Comments