XF 2.0 Forum down, why?

V3NTUS

Well-known member
I run a 128GB dedicated server, and I'm used to DDoS but most of the time my server can easily resist to those attacks as they're not strong enough.

I run a xenforo forum in a subdomain of my main site, and I noticed the forum goes offline quite often during DDoS attacks, while the main site keeps being online, so I was wondering why do this happen?

From the Apache status I can see a lot of requests indeed which indicates a DDoS as it's unusual, but since the main site keeps working fine while I'm being attacked, while does Xenforo go down?

Is there a security measure which automatically puts the forum offline to prevent further attacks or what?

I can't seem to find a solution to this problem, any help is appreciated.

I run on CentOS with WHM & cPanel, Apache and php 7.0, CSF&LFD and Cloudflare protection and even tho the "I'm under attack" of Cloudflare brings back the forum online, I'd like to find a way to allocate more resources to the forum or to do anything I can in order to prevent the downside while attacked, as it seems to affect only the forum and not the whole domain.

Thank you for reading.
 
Are the rest of the pages on your site static or database driven? It's possible (likely?) that XF isn't able to connect to the database as it needs to when there is a DDos attack going on; and as a result the pages simply fail to load.

How many concurrent database connections is that site currently allowed?

Others probably know better than I do, but that's my gut response without knowing any other information about your site.
 
Thank you for your response. My main website runs on Joomla so it's dynamic content, as per connections to database, I set it to 2000 max connections but again, if we reached 2000, my main website would be offline too, right?
 
  • Like
Reactions: CJ6
Thank you for your response. My main website runs on Joomla so it's dynamic content, as per connections to database, I set it to 2000 max connections but again, if we reached 2000, my main website would be offline too, right?

Maybe, what error do you see when the forum goes down? Is it a there's been a problem message? Or do you get something like "connection failed" directly from the browser?

I believe, at least with XF1.5 that if any part of the script returns an error or warning, the page puts up a message. I would troubleshoot that differently than not being able to connect to the site at all.

Also, is it possible that the main website is caching either in your browser or cloudflare, and that the forum pages don't?
 
Thank again, you're very kind.

The error is 504 gateway timed out from Cloudflare (after a lot of seconds I wait for it to load) while the main site is online and definitely not a cached copy as I can modify the front-end in real-time.

Also, the forum is very lightweight as it's size is around 200kb and I already load jquery, bootstrap and FontAwesome from remote sources.

Thank you again.
 
Last edited:
I don't use cloudflare, but you might want to check their support documents or any logs they offer you. It's hard for me to give you any more ideas since the error you're seeing is coming through cloudflare and not directly from your server.

Maybe someone else here will know more about troubleshooting from the XF side as well.

Best of luck!
 
Being on a dedicated server with 128GB of dedicated ram, I didn't think it would've been so common, and indeed it happens only with Xenforo, as I specified before.

Anyways yes, during this downtime several error logs have been logged, such as:

  • InvalidArgumentException: Accessed unknown getter 'Promotions' on XF:Post[130738]
  • src/XF/Mvc/Entity/Entity.php:182

There are about 232 pages of errors generated during this downtime (which lasted about 7 minutes), and they all report the same error, this is why I think it might not be related to the server, but to some errors triggered in Xenforo which I am unable to detect.

Thank you all for the interest.
 
Full error shown below:


  • InvalidArgumentException: Accessed unknown getter 'Form' on XF:Thread[9728]
  • src/XF/Mvc/Entity/Entity.php:182

Stack trace
#0 src/XF/Mvc/Entity/Entity.php(100): XF\Mvc\Entity\Entity->get('Form')
#1 internal_data/code_cache/templates/l1/s1/public/thread_view.php(851): XF\Mvc\Entity\Entity->offsetGet('Form')
#2 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#4 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#5 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#6 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#8 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
["url"] => string(23) "/threads/mod-menu.9728/"
["referrer"] => string(47) "https:// my website .com/threads/mod-menu.9728/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Back
Top Bottom