Maybe this is a dumb question, but why would replacing websockets speed things up? I read the Wikipedia page on it, but I guess I don’t understand it fully.
In general websockets scale badly because the server has to keep open a connection and a fair amount of state. You also can't really cache websocket messages like you can normal HTTP responses. Not sure which reasons apply to Lemmy though.
Just hopping into the chain to say that I appreciate you and all of your hard work! This place—Lemmy in general, but specifically this instance—has been so welcoming and uplifting. Thank you!
At least the "reply" button goes away so I don't end up double- triple- or even duodecuple-posting! Thanks for all the hard work that must be going on behind the scenes right now!
I kept getting a timeout message from Jerboa which led me to think I hadn't been posted. So I ended up submitting the same joke to the Dad Jokes sub three times. Which actually is how dad might tell that joke.
I get this occasionally with Jeroba too, I had assumed it was because I'm on Mint and the connection is shoddy but maybe it's an issue with the client.
Have you tried enabling the slow query logs @[email protected]? I went through that exercise yesterday to try to find the root cause but my instance doesn’t have enough load to reproduce the conditions, and my day job prevents me from devoting much time to writing a load test to simulate the load.
I did see several queries taking longer than 500ms (up to 2000ms) but they did not appear related to saving posts or comments.
Been noticing this in the app I’m working on. Pretty much all POST requests fail to return a response and just timeout after 60 seconds. A quick refresh shows that the new items do successfully get created though.
Thanks for your and the other Lemmy devs work on this. These growing pains are a good thing as frustrating as it can be for users and maintainers alike. Lemmy will get bigger and this optimization treadmill is really just starting.
In my case, the page keeps spinning but the post is not submitted, regardless of reloading the page or waiting for a long time.
There was one case where I cut down significantly on the amount of characters in the post and then it posted, but I have been unable to replicate this.
I have the same issue with image posts. If I submit them through the app the posts counter on my profile goes up, but there's no post. I also can't retrieve any posts for my own account. It says I have 3 but it shows none.
Comments work OK so I'm not sure what the problem is. I was worried I got restricted or something.
Edit: Comments seem to work as the OP suggests though. I get the spinner but they've been posted already.
Edit2: It seems like I can't post link threads either.
Edit3: Even worse, it seems like I can't see my own posts but others can. So I might have spammed Warhammer40k and tabletopminis and I can't even clean up my own mess.
Edit4: If I sign out and go to these communities I can see my own posts. I can also go directly to them if I have the link. I can also keep track of them by clicking the star button but it seems like my feed is broken.
Edit5: Oh my god I'm so fucking stupid. If you hide posts you've seen it'll also hide your own posts...
@[email protected] Yo dude, first off huge props and a big thank you for what you have setup. I’ll be donating monthly while I am here. I appreciate that we have an alternative to Reddit at this critical moment in time.
I do have a question on your long term plans, do you want to continue to expand and upgrade the server, as funding allows, or is there a cap that you will close off the server to new members? Or perhaps make it more of a process to join?
Well if all the Reddit users would get over to Lemmy I guess all servers would need to scale up... but I think the server we have now is powerfull enough to grow quite a lot, as long as the software gets tuned ..
Is the slowdown that it the instance has to send out updates about the comment to every other instance before returning a successful response? If so, is anyone working on moving this to an async queue?
Sending out updates seems like something that’s fine being eventually consistent
Reading more about how this works, sending out updates to each instance shouldn’t block the request from returning unless you have a config flag set to debug source.
It might be due to poorly optimized database queries. Check out this issue for more info. Sounds like there are problems with updating the rank of posts and probably comments too
Haha this just happened to me on my very first ever post to Lemmy and I was about to ditch this app. Not really. But I did copy my somewhat long post just in case. And I'm glad I did because I had to refresh and paste again and submit. However, within that issue, I found a weird bug. I had clicked on another post b4 going back to the thread that I wanted to re submit my comment. I checked out my profile to see my first comment and for some reason, my comment got posted on both threads, the related thread and the non-related thread. Devs might want to look into that one.
One of the large applications I was working on had the same issue, to solve it we ended up creating multiple smaller instances and started hosting a set of related API's in each server.
for example read operations like list posts, comments etc could be in one server.
write operations can be clusered in one server.
Later, whichever server is getting overloaded can be split up again. In our case 20% of API's used around 3/4th of server resources, so we split those 20% API's in 4 large servers and kept the remaining 80% API's in 3 small servers.
This worked for us because the DB's were maintained in seperate servers.
I wonder if a quasi micro-services approach will solve the issue here.
Edit 1: If done properly this approach can be cost effective, in some cases it might cost 10 to 20 percentage more in server costs, however it will lead to a visible improvement in performance.
My comments seem to not go through sometimes, whenever I upvote posts on Jerboa I get an error that just says timeout. Doesn't seem to happen on other instances.
Yea I started just using my clipboard alot, and hitting the x or back on jerboa and comments go thru at about 90% success rate. For posts I let it do its thing just incase. But been copying stuff to save as draft.