Suddenly tons of CF 520 errors


Active member
Hello everybody,

since yesterday afternoon there are 520 error messages from Cloudflare in our forum. The error occurs completely randomly and everywhere. We only moved to a new server a few weeks ago and everything went perfectly. I will of course also contact my hoster. But I have already researched and noticed that this error can often not be localized and corrected immediately and clearly. That is why I also include you and XF in this problem, in the hope that bright people will be found here who might be able to contribute to a solution.

Error messages / problems:




I made the following changes in .htaccess almost ten days ago:

<IfModule mod_deflate.c>
   AddOutputFilterByType DEFLATE text/plain
   AddOutputFilterByType DEFLATE text/html
   AddOutputFilterByType DEFLATE text/xml
   AddOutputFilterByType DEFLATE text/shtml
   AddOutputFilterByType DEFLATE text/css
   AddOutputFilterByType DEFLATE application/xml
   AddOutputFilterByType DEFLATE application/xhtml+xml
   AddOutputFilterByType DEFLATE application/rss+xml
   AddOutputFilterByType DEFLATE application/javascript
   AddOutputFilterByType DEFLATE application/x-javascript

<ifModule mod_expires.c>
   ExpiresActive On
   # Add default Expires header
   <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|svg|woff|woff2)$">
   ExpiresDefault "access plus 1 year"

Furthermore, I activated OPCache with php.ini, also around ten days ago.

A week ago I did "Rebuild Threads" and "Rebuild Cache" in order to be able to use an addon from @Xon ("Who Replied") correctly. During Rebuild Cache (over 3 million posts), only a blank page appeared in the ACP after around 2.5 million posts. After a refresh, however, it continued and the process was successfully completed. I will just mention this once, as there could possibly be a connection here.

Other addons that I use:

  • SC Separate Sticky Threads 2.0.0
  • TH Ignore More
  • Standard Library 1.6.0
  • User Activity 2.8.2
  • Xenforo Redirects for vBulletin 1.1.7
  • a not yet published addon by @Kirby which is still in the BETA.

Finally, there may be the option of a DDOS attack. Maybe it's just a coincidence, but two days ago we temporarily banned a member. At least I couldn't completely rule out a connection to the current problems.

I look forward to every well-intentioned suggestion. Thank you in advance.
Last edited:


XenForo moderator
Staff member
It's nothing unusual with CF.
It's been happening on this site for a week or more.