@lain Really? Mastodon has a connection for each Sidekiq thread.
It's not the main reason, but having more would help out. The main issue is that lot of queries take forever so they clog up the connections and make the entire instance freeze up.
@matrix adding more connections probably won't help, postgres itself still needs to actually serve the data. if waiting for queries regularly clogs up 10 connections, you probably need better queries, not more connections. but maybe it works in your case, worth trying out at least.
@lain Yeah, better queries are obvious, but not something I'm going to fix. I'm going to try it out, but first I gotta figure out how, because the code isn't setup for it.