Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.03k stars 1.5k forks source link

S3 Storage not used for every videos (?) #5670

Closed Nalem14 closed 1 year ago

Nalem14 commented 1 year ago

Describe the current behavior

I can see that my Storage folder is heavy, but I use an S3 storage to store videos I have tried some time to launch job to move all video to s3 storage, but I continue having a big storage folder

Steps to reproduce

(unknown)

Describe the expected behavior

When I use the S3 storage I don't want that videos are stored localy. Do you have any idea of what are the problem ? It is a bug ?

Additional information

Storage used (see /videos and /streaming-playlists):

root@mckay:/var/www/peertube/storage# du -hs ./*
114M    ./avatars
11M ./bin
16K ./cache
11M ./captions
372K    ./client-overrides
926M    ./logs
1.3G    ./plugins
409M    ./previews
28G ./redundancy
470G    ./streaming-playlists
1.4G    ./thumbnails
20K ./tmp
208M    ./torrents
145G    ./videos
4.0K    ./well-known
Chocobozzz commented 1 year ago

Can you run https://docs.joinpeertube.org/maintain/tools#create-move-video-storage-job-js and display the output?

Nalem14 commented 1 year ago

Can you run https://docs.joinpeertube.org/maintain/tools#create-move-video-storage-job-js and display the output?

Hello and thank your for your answer :) I run this every day since 3 days, I have started it and send it to you when it is finished.

Also here is my current bucket used space: image

So it is working, but some videos are not uploaded for unknown reason.

Nalem14 commented 1 year ago

output.txt @Chocobozzz Here is the full output

Nalem14 commented 1 year ago

I just seen that I have failed jobs with that errors image image

(The 'RangeError: data is too long' is the more common error I see)

Chocobozzz commented 1 year ago

Thanks,

For the first screen, can you paste the output of the following sql command (replace 'video of job 10617)?

select "videoFile".* from video 
inner join "videoStreamingPlaylist" ON "videoStreamingPlaylist"."videoId" = video.id 
inner join "videoFile" ON "videoFile"."videoStreamingPlaylistId" = "videoStreamingPlaylist".id 
where video.uuid = 'video of job 10617';

For the second screen see https://github.com/Chocobozzz/PeerTube/issues/5525

Nalem14 commented 1 year ago

Thanks for your help I have applied the change for max upload part and run the move to object storage again.

Here is the result of the SQL command image

Chocobozzz commented 1 year ago

Thanks, the second error should be fixed by https://github.com/Chocobozzz/PeerTube/commit/9c84bf515691bad77ea4befbaf1f866c11c5dadd