XF 2.2 Forum slow and crashes

Also adding this

Code:
Stack trace
#0 src/XF/Db/Mysqli/Statement.php(110): SV\SlowQueryLogger\Db\Mysqli\SlowQueryLogAdapter->logQueryCompletion()
#1 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#2 src/XF/Db/AbstractAdapter.php(157): XF\Db\AbstractAdapter->query('
            SE...', Array)
#3 src/addons/AwesomeForo/TopUser/Repository/TopUser.php(708): XF\Db\AbstractAdapter->fetchAll('
            SE...')
#4 src/addons/AwesomeForo/TopUser/Widget/TopXUser.php(23): AwesomeForo\TopUser\Repository\TopUser->getYearlyTopPosters(10)
#5 internal_data/code_cache/widgets/_44_top_user_side.php(5): AwesomeForo\TopUser\Widget\TopXUser->render()
#6 src/XF/Template/Templater.php(7509): XF\SubContainer\Widget->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Array)
#7 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#8 src/XF/Template/Templater.php(1928): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#9 internal_data/code_cache/templates/l5/s9/public/forum_list.php(216): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#10 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)
#12 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#14 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#17 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#18 src/XF.php(512): XF\App->run()
#19 index.php(20): XF::runApp('XF\\Pub\\App')
#20 {main}
Request state
array(4) {
  ["url"] => string(7) "/forum/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

please help debugging
 
It appears likely.

The slow queries all had to do with recounting every single post of your site from between every 10 seconds to every couple minutes (likely on every page load with a Top User widget). When this query runs it requires counting 5+ million rows in the database, taking 3.5 seconds each time. This could be the result of it trying to continually recalculate your Top User widget data.
 
It appears likely.

The slow queries all had to do with recounting every single post of your site from between every 10 seconds to every couple minutes (likely on every page load with a Top User widget). When this query runs it requires counting 5+ million rows in the database, taking 3.5 seconds each time. This could be the result of it trying to continually recalculate your Top User widget data.
My users still complain after I deleted the “awesome plugin”

Can you help me to debug more?
 
Check your Google Pagespeed Insights, there is a ton of free information there.

With just a quick look on your forum page, you have a lot on unused javascript loading (appears to be from multiple ad networks that aren't currently displaying ads). You should really look at consolidating your Ad serving through a single network multiple networks means a lot of extra code and third-party render blocking scripts typically. These multiple ad networks are also loading multiple tagging scripts (Google, Quantcast Choice, and Tribomedia), this is also a lot of additional code.

You are loading two different versions of jquery (3.51 - used by XenForo, and 1.83 being loaded by something else). You should typically only need to use one version, this can cause issues.

You're caching is not efficient. Some items like javascript and css are not caching at all, others resources like images are set to 30 days which is quite short.

Fix the issues above and you'll be off to a good start.
 
Top Bottom