I have a dedicated VPS, running the latest Tiny Tiny RSS v18.8 (79c5035). Nginx, PHP 7, PGSQL. I have about 150 feeds on an account which is regularly read and purged and another user which managed to rack up some 50,000 unread posts which I’ve subsequently purged. Running update_daemon2.php as a service, built-in plugins and
embed_original
feediron
ff_xmllint
tumblr_gdpr_ua
videoframes
Everything was working fine for years until nine days ago, when feed updates began generating insane amounts of incoming traffic on each run (every 60 seconds), which I’ve noticed when I got an e-mail from my provider warning me that I’ve used up 0.78 TB out of my 1TB allotment, which never ever happens.
The traffic spike (some 60-100 mb) happens at the very end of the feed update, after it checks all the feeds, i.e. somewhere during this time:
[18:25:48/11293] Processed 21 feeds in 17.6000 (sec), 0.8381 (sec/feed avg)
[18:25:48/11293] Running housekeeping tasks for user 5…
[18:25:48/11293] Sending digests, batch of max 15 users, headline limit = 1000
[18:25:48/11293] All done.
[18:25:48/11293] cache/feeds: removed 0 files.
[18:25:48/11293] cache/images: removed 0 files.
[18:25:48/11293] cache/export: removed 0 files.
[18:25:48/11293] cache/upload: removed 0 files.
[18:25:48/11293] Removed 0 old lock files.
[18:25:48/11293] Removing old error log entries…
[18:25:48/11293] Feedbrowser updated, 110 feeds processed.
[18:25:48/11293] Purged 1 orphaned posts.
[18:25:48/11293] Removed 0 (feeds) 0 (cats) orphaned counter cache entries.
For the life of me, I can’t remember updating anything right before this weirdness started happening. I can’t be sure what version was running when this started happening, because I’ve updated to the latest github version since.
I’ve switched off image caching for all feeds, purged a lot of stuff, but no change. 60 mb might not seem too much, but 60 mb x 60 minutes x 24 hours amounts to almost 85 gigs of unaccounted-for traffic per day.
The email digest plugin is disabled globally.
Both update_daemon2.php and manual runs of update.php do this. I’ve switched from a service to updating every 15 minutes via cron to limit the traffic, but I’d love to find out the root cause of this.
An example of one such event, the smaller SSH window is running nload, I’ve manually run update.php --feeds in the left.
The bandwidth chart for my VPS:
So the question is, what function run at the end of the update could generate incoming traffic?
I did that when things went sideways. I’ve now disabled internal plugins and it seems that cache_starred_images is the culprit, but I’m not sure why it would repeatedly cache stuff that’s already in the cache folder. Judging by the size, it could be trying to cache a video.
Does the update script have any options for verbose logging?
DAEMON_EXTENDED_DEBUG has nothing to report about the cache_starred_images plugin. It clearly downloads the video each time, but it never gets saved to cache/starred-images. Anything else I can try?
There’s only a basic _debug("cache_images: downloading: $src to $local_filename");
commented out which just proves that the download does get triggered, but provides no feedback whether the download was successful or has errors.
In any case, thanks for the assist, I’ve decided to disable the plugin to prevent any potential issues in the future.
It might be a good idea to at least add a minimal logging entry to the plugin which would mention that images/videos are being cached, it would have greatly simplified my investigation.
downloading stuff repeatedly is bad for whatever reason, i’ll add some kind of status tracking to cache_starred so that won’t happen, allow one or two attempts per-article and that’s it.
e: there’s some already (via database article marking) but it wasn’t enough.
Works as intended, the video was downloaded, or rather wasn’t, only once. I didn’t think to enable logging so I haven’t found out the underlying cause, though.