[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.2

No permission to download
Oh ya, I just remembered there is no migration tool for the xfmg folder. Not terribly hard to add (I just added it for the next release). In the meantime, you you could use rclone or something.
 
When guest page caching is enabled, merging users (source having 5k messages into target having 100k messages) creates high server load and database connection timeouts.

When disabled it, the process took couple of minutes without any issues.

I suspected that this is connected to the add-on because there were numerous entries from it in the xf_job table during the process.
 
Last edited:
Maybe it should be automatically disabled for bulk actions?

Also I think that "Cache XenForo guest pages" cache rule (which add-on creates in Cloudflare) should include hostname, for accounts having multiple subdomains.
 
that's alright. just wanted to share that as a fyi. thanks!

noticed another weirdness that others might be able to check and confirm. exported settings backup file does not seem to get imported as it shows invalid backup archive. this happened on 2.2 as well when i accidentally tried importing the exported file from the same install. and it failed to get imported on 2.3 build lol. the downloaded zip file does open and has a json file in it so the file is not corrupt.
 
Are you sure you updated it (vs. just copying the files)?

If you did update it, you may want to rebuild the master data for the site. For whatever reason the new option didn't get "installed" somehow.
I updated today and have this error. When you say rebuild the master data for the ste - what do you mean exactly please?


Code:
ErrorException: [E_WARNING] Undefined array key "cfMediaCachingSeconds" src/addons/DigitalPoint/Cloudflare/Listener/AppPubComplete.php:10
Generated by: Unknown account Apr 4, 2024 at 9:01 AM
 
so yeah, i understand that this addon is not yet updated to support 2.3 betas. just wanted to post this here. same issue on my test install.

Still not exactly clear why XenForo 2.3 wants to keep part of the data directory local instead of in the filesystem you want to use, but will figure that out (and possibly address if needed) later. For now, if someone is using XenForo 2.3, replace the addons/DigitalPoint/Cloudflare/XF/FsMounts.php file with this one and you should get the new local-data mount point that 2.3 uses.
 

Attachments

@digitalpoint
I noticed that cloudflare offers this plugin:
Optimizing your WordPress site with multiple plugins can be overwhelming. Switch to a single plugin from Cloudflare and get up to 4x faster loading speed. Automatic Platform Optimization (APO) includes ultra-fast CDN, intelligent caching and requires no setting up.

Do you recommend running this plugin and yours side by side? Are you planning to integrate the same features?
 
@digitalpoint
I noticed that cloudflare offers this plugin:


Do you recommend running this plugin and yours side by side? Are you planning to integrate the same features?
Different product/different platform. This thread is busy enough without forcing hundreds of people to get alerts about non-XenForo stuff, so best to use the appropriate support channels for that (either on wordpress.org or appforcf.com).

Don’t particularly like telling you to do that, but if everyone asked one individually small, question unrelated to this XenForo addon, this thread becomes useless for its intended purpose.

If you are talking about XenForo, that plugin isn’t for XenForo, so you can’t run both anyway.
 
I run both WP and XF CF plugins. But fair enough.
You can run the XF version and Cloudflare’s APO plugin on the same domain if you have both WordPress and XenForo running on the same domain (I think that’s the question)?

As far as the addon not having features of the APO plugin, what are you looking for exactly? I’m not aware of anything APO does that this addon doesn’t already do. But if there’s something specific, let me know.
 
Its unclear to me if the plugin with paid service includes new things or if the same can be accessed anyway.
It seems that it automatically configures and adds:
  1. CloudFlare CDN.
  2. Intelligent Cache of HTML. I'm not sure what they mean by intelligent cache and how that is different from CF Cache.
  3. Automatically fixing mixed content
  4. Caching Dynamic Content. This would probably be interesting for XF as well.
 
I've been wrestling a bit with the migrate tool. On a regular migrate command on a 32-core CPU instance, it seems it very quickly hits a point where one file or another times out, and the entire process ends. We're not even getting close to a complete migration, only about 1,000-1,500 objects in out of about 90,000 before we hit this error. When we enable verbose mode it goes a little longer, but still errors out about 5,000 objects in with a 60 second timeout.

Here's the error:

Code:
  5197/87474 [=>--------------------------]   5%  3 mins  1.1 MB/s
In Process.php line 1331:

  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process "/usr/bin/php8.3 cmd.php dp:migrate-data --location=data --path
  =avatars/s/0/256.jpg" exceeded the timeout of 60 seconds.


Exception trace:
  at /www/public_html/forum/src/vendor/symfony/process/Process.php:1331
 Symfony\Component\Process\Process->checkTimeout() at /www/public_html/forum/src/vendor/symfony/process/Process.php:418
 Symfony\Component\Process\Process->wait() at /www/public_html/forum/src/addons/DigitalPoint/Cloudflare/Cli/Command/Migr6
 DigitalPoint\Cloudflare\Cli\Command\MigrateData->waitForProcesses() at /www/public_html/forum/src/addons/DigitalPoint/C8
 DigitalPoint\Cloudflare\Cli\Command\MigrateData->execute() at /www/public_html/forum/src/vendor/symfony/console/Command5
 Symfony\Component\Console\Command\Command->run() at /www/public_html/forum/src/vendor/symfony/console/Application.php:92
 Symfony\Component\Console\Application->doRunCommand() at /www/public_html/forum/src/vendor/symfony/console/Application.5
 Symfony\Component\Console\Application->doRun() at /www/public_html/forum/src/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /www/public_html/forum/src/XF/Cli/Runner.php:111
 XF\Cli\Runner->run() at /www/public_html/forum/cmd.php:15

dp:migrate-data [--new-to-old] [--processes PROCESSES] [--start-at-path START-AT-PATH] [--location LOCATION] [--path PAT]

Any ideas to help it along? If not we'll have to try rclone instead.

Edit: Tried rclone, having one hell of a time trying to get it to recognize everything. Seems some stuff works, other's don't. Weird folder obfuscation issues, I think? For example in the /data/ directory the avatar images load just fine, but some addon assets located in /data/assets/ don't.
 
Last edited:
Edit: Tried rclone, having one hell of a time trying to get it to recognize everything. Seems some stuff works, other's don't. Weird folder obfuscation issues, I think? For example in the /data/ directory the avatar images load just fine, but some addon assets located in /data/assets/ don't, unless we prefix those with "data/" in the rsync job???
Take a look at
and
which should help for using rclone.
 
Take a look at
and
which should help for using rclone.
Hmm, what I'm getting from this is that some addon developers aren't using the abastraction layer to fetch and store files on the xenforo platform, and this causes a disconnect between the R2 storage and the addon attempting to fetch the file on the local server. The fix appears to be, keep the assets/extra folders in /data stored locally so those improperly invoked get_file_contents methods still work, and pressure the addon developers to make the fix for each individual addon we have. Am I understanding this right?
 
Top Bottom