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…
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.
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?
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
Didn’t know about the timeout but that makes sense. Would be easy to test by changing the nginx timeout.
pg_locks shows alarming periods when lots of locking is holding up activity. Inserts take pretty long time on like tables for comments and postings.