m4v3rick While a Redis queue may help mitigate the problem, it will not solve it. The main problem is that you have too many extensions. So ideally you should take stock of extensions and decide which ones are critical or not. I recently went through a similar problem.
Based on my experience, I can tell you some of the extensions that impact performance a lot. These extensions I removed from 3 installations because of high resource consumption. Think of two factors, loading and publishing, I will break them into two stages, and try to give you some advice if you can't do without them:
Performance issues when publishing:
- therealsujitk-gifs v4.1.1: It is not adapted to the latest versions of Flarum and consumes high resources. Will have to optimise it.
- fof-drafts | 1.2.8: Use the Flarum scheduler to glue the drafts, or Redis.
Performance issues when reading:
- justoverclock-popular-tags: Both this extension and any other view-based extension are resource gluttons, you have to register each view in the database and write to it. If you can, apply some kind of cache or use a method to display popular tags that doesn't depend on views.
- fof-sitemap 2.2.0: It consumes resources every time you submit a new comment, technically it has to load every new comment in the sitemap, so I advise you to use the cron method if you can't do without it.
- fof-analytics: I haven't tried this one, but you'll want to replace it with Ianm's HTML Head, which is more effective and allows you to load multiple tgs in the head.
- afrux-online-users-widget and afrux-top-posters-widget: Try to use some kind of cache, otherwise if your community is active you will have problems.
It would also be good to know if you are using the default Flarum theme or any other theme like Asirem, which gives a lot of problems.
I took a practical approach to limiting posts, so that after a certain number of posts, the discussion closes automatically. It's a solution that luceos helped me with, you can read more here, but basically you should add this code to your extend.php and change the 2000 to the maximum number of posts allowed, think that every time a discussion starts to generate performance problems, it's not only affecting one user, but the whole installation (it can exhaust the server resources), so the approach of limiting the number of posts and the PHP memory_limit can be a good and healthy solution.
(new Extend\Event)
->listen(\Flarum\Post\Event\Posted::class, function (\Flarum\Post\Event\Posted $event) {
// Check if we reached 2000 comments to a discussion and it isnt locked yet.
if ($event->post->discussion->comment_count > 2000
&& !$event->post->discussion->is_locked) {
// Lock the discussion.
$event->post->discussion->is_locked = true;
// Save the discussion if any of its properties are modified.
$event->post->discussion->isDirty() && $event->post->discussion->save();
}
}),