Hi,
I've noticed some time ago I can't remove the remote media via the mastodon:media:remove_remote task
I get the Scoped order is ignored, it's forced to be batch order. error if I use it manually or via cron.
I don't know if it is normal or it's correctly working because my storage is growing a lot.
I'm running master to see if it was kind of fixed but happens in the last tagged release too.
I hope you can guide.
Thanks in advance.
master (If you're a user, don't worry about this).Duplicates #7882 ?
I'm having the same issue. I used to have this in cron.daily:
docker-compose run --rm web bundle exec rake mastodon:media:remove_remote
and it was removing old media like it's supposed too. Now (not sure when it began exactly) it's giving the error mentionned by @Turbito and not cleaning anything. The issue linked by @Tagadda says it's a sidekiq job now (has been for some time), but if I installed the cronjob it's because the sidekiq job was not working in the first place. Now both methods are not working. Clicking ENQUEUE manually from the sidekiq admin for the media_cleanup_scheduler seems to have no effect. It's not enqueued. It's not executed.
Running version 2.4.3 in Docker, with latest docker version of sidekiq and redis.
This is a big problem as the media_attachment folder is growing fast!
If someone has a temporary solution for cleaning up, I'll take it too :)
the error message is a red herring, is a warning that mastodon prints
whenever you run any process
On Mon, Aug 13, 2018, 7:42 AM Nicolas CARPi notifications@github.com
wrote:
I'm having the same issue. I used to have this in cron.daily:
docker-compose run --rm web bundle exec rake mastodon:media:remove_remote
and it was removing old media like it's supposed too. Now (not sure when
it began exactly) it's giving the error mentionned by @Turbito
https://github.com/Turbito and not cleaning anything. The issue linked
by @Tagadda https://github.com/Tagadda says it's a sidekiq job now (has
been for some time), but if I installed the cronjob it's because the
sidekiq job was not working in the first place. Now both methods are not
working. Clicking ENQUEUE manually from the sidekiq admin for the
media_cleanup_scheduler seems to have no effect. It's not enqueued. It's
not executed.Running version 2.4.3 in Docker, with latest docker version of sidekiq and
redis.This is a big problem as the media_attachment folder is growing fast!
If someone has a temporary solution for cleaning up, I'll take it too :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tootsuite/mastodon/issues/8145#issuecomment-412490788,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAORV21vd1lNsAIHVdPohBUmcnoqJ4qbks5uQWYQgaJpZM4V0Ioc
.
@nightpool red herring or not, attachments are not removed anymore. Before you could see all the files being removed, now nothing except this message.
Are you sure they are not removed? Because no, it does not happen within this process, a big number of small jobs are queued into sidekiq and are then processed in the background, you don't see any specific progress unless you watch sidekiq logs.
Are you sure they are not removed?
Well, looking at the directory size of public/system/media_attachments with du -s instead of du -sh showed indeed a reduction in size. But this reduction is very minimal, probably because I just ran it before. The folder size is ~7 Gb, before it was more like 2 Gb max. There are 39924 files in there (instance is ~500 users, with only few of them active).
The command (rake mastodon:media:remove_remote) now is exiting very quickly, before it was taking some time to delete a bunch of files (and showing it). I'll try again tomorrow because now of course there might not be a lot of files to delete.
Can someone give me a command to count the number of files that should be deleted with this command? So we can compare this number to the number of actually deleted files after the command media:remove_remote. This would tell us if there is something wrong.
Maybe nothing is wrong, it's just that the folder is now bigger because the fediverse is bigger, I'm not sure.
Then there is the issue of sidekiq apparently completely ignoring the "Enqueue now" button click, but that's another story.
FWIW in the master branch, the task will now tell you how many sidekiq jobs it put into the queue thanks to @ThibG
So I let it sit for a few days without running the cronjob. The folder is now 15 Gb. Running the command removes a few files, but clearly not enough. There is something definitely wrong with the remove_remote command imho!
before:
81454 files (in media_attachments) ~15 Gb
after running the rake task mastodon:remove_remote:
80634 files, still around 15 Gb
If the command is ran again, the file count decreases. Running it a second time gave me 67k files with around 12 Gb.
So there is something fishy in there :)
See #8339
Most helpful comment
FWIW in the master branch, the task will now tell you how many sidekiq jobs it put into the queue thanks to @ThibG