Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically clean-up leftover .part files after failed uploads to shared folders #26179

Open
hul51u opened this issue Mar 17, 2021 · 10 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: dav hotspot: file transfer performance upload & download performance related optimizations

Comments

@hul51u
Copy link

hul51u commented Mar 17, 2021

Steps to reproduce

  1. Create a link share for a folder with File Drop permission
  2. Upload files and before finish cut the connection

Expected behaviour

.part files should be automatically removed, if upload has failed.

Actual behaviour

.part file(s) remain on file system. Invisible on nextcloud, only in direct acces to the filesystem

Server configuration

Operating system:
Ubuntu 20.04

Web server:
Apache/2.4.41

Database:
mariadb 10.3.25

PHP version:
7.4.3

Nextcloud version:
20.0.8

Updated from an older Nextcloud/ownCloud or fresh install:
updated

Nextcloud configuration:

Are you using external storage, if yes which one: local/smb/sftp/...
local

Are you using encryption: yes/no
no

@hul51u hul51u added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 17, 2021
@AdamVenn
Copy link

I have also had this problem. Is it a sort of cache so you can resume the upload from where you left off? If so, it should be deleted after 10mins or so.

@hul51u
Copy link
Author

hul51u commented Jun 15, 2021

In my case the part-files remain (for months now). Maybe file sharing is the significiant item in this issue?

@szaimen

This comment was marked as outdated.

@ghost

This comment was marked as outdated.

@ghost ghost added the stale Ticket or PR with no recent activity label Aug 27, 2021
@ghost ghost closed this as completed Sep 10, 2021
@hcoin
Copy link

hcoin commented Feb 12, 2022

It's not stale just because no answer came forward. Look at this on nextcloud stable:

-rw-r--r-- 1 www-data www-data  48568423 Jan 20 23:15 IMG_9504.MOV
-rw-r--r-- 1 www-data www-data  96755712 Feb 10 14:18 IMG_9652.MOV.ocTransferId1548366895.part
-rw-r--r-- 1 www-data www-data  20578304 Feb 10 14:18 IMG_9640.MOV.ocTransferId2128865596.part
-rw-r--r-- 1 www-data www-data   7733248 Feb 10 14:18 IMG_9641.MOV.ocTransferId1833111987.part
-rw-r--r-- 1 www-data www-data  19185664 Feb 10 14:18 IMG_9644.MOV.ocTransferId427040151.part
-rw-r--r-- 1 www-data www-data  19546112 Feb 10 14:18 IMG_9643.MOV.ocTransferId1013866030.part
-rw-r--r-- 1 www-data www-data 177782784 Feb 10 14:18 IMG_9645.MOV.ocTransferId1991376030.part
-rw-r--r-- 1 www-data www-data  52387840 Feb 10 15:15 IMG_9569.MOV.ocTransferId1316020687.part
-rw-r--r-- 1 www-data www-data  52387840 Feb 10 15:15 IMG_9571.MOV.ocTransferId1056400391.part
-rw-r--r-- 1 www-data www-data  69963571 Feb 10 17:39 IMG_9638.MOV.ocTransferId1449344715.part
-rw-r--r-- 1 www-data www-data  70516736 Feb 10 17:39 IMG_9640.MOV.ocTransferId625920867.part
-rw-r--r-- 1 www-data www-data  70303744 Feb 10 17:39 IMG_9637.MOV.ocTransferId1647550401.part
-rw-r--r-- 1 www-data www-data 137879552 Feb 10 17:49 IMG_9643.MOV.ocTransferId729562700.part
-rw-r--r-- 1 www-data www-data 137838592 Feb 10 17:49 IMG_9642.MOV.ocTransferId204735066.part
-rw-r--r-- 1 www-data www-data 249397248 Feb 10 18:09 IMG_9645.MOV.ocTransferId2107392915.part
-rw-r--r-- 1 www-data www-data 234733568 Feb 10 18:09 IMG_9652.MOV.ocTransferId1734910247.part
-rw-r--r-- 1 www-data www-data 240418816 Feb 10 18:46 IMG_9637.MOV.ocTransferId297337686.part
-rw-r--r-- 1 www-data www-data  56688640 Feb 10 19:19 IMG_9643.MOV.ocTransferId493114642.part
-rw-r--r-- 1 www-data www-data  56688640 Feb 10 19:19 IMG_9645.MOV.ocTransferId167780335.part
-rw-r--r-- 1 www-data www-data  56721408 Feb 10 19:19 IMG_9642.MOV.ocTransferId339134341.part
-rw-r--r-- 1 www-data www-data  56721408 Feb 10 19:19 IMG_9638.MOV.ocTransferId572781172.part
-rw-r--r-- 1 www-data www-data 159203328 Feb 10 19:52 IMG_9637.MOV.ocTransferId1805677728.part
-rw-r--r-- 1 www-data www-data  59736064 Feb 10 20:35 IMG_9652.MOV.ocTransferId731692618.part
-rw-r--r-- 1 www-data www-data  59801600 Feb 10 20:35 IMG_9638.MOV.ocTransferId2097139771.part
-rw-r--r-- 1 www-data www-data  59949056 Feb 10 20:35 IMG_9642.MOV.ocTransferId240003823.part
-rw-r--r-- 1 www-data www-data  59719680 Feb 10 20:35 IMG_9643.MOV.ocTransferId870657588.part
-rw-r--r-- 1 www-data www-data  63012864 Feb 10 20:35 IMG_9645.MOV.ocTransferId794008967.part
-rw-r--r-- 1 www-data www-data 220643328 Feb 10 21:01 IMG_9637.MOV.ocTransferId1899943946.part
-rw-r--r-- 1 www-data www-data   4734976 Feb 10 23:07 IMG_9642.MOV.ocTransferId2107840585.part
-rw-r--r-- 1 www-data www-data   4644864 Feb 10 23:07 IMG_9637.MOV.ocTransferId1272210924.part
-rw-r--r-- 1 www-data www-data   4751360 Feb 10 23:07 IMG_9645.MOV.ocTransferId1011779589.part
-rw-r--r-- 1 www-data www-data   4751360 Feb 10 23:07 IMG_9643.MOV.ocTransferId98427378.part
-rw-r--r-- 1 www-data www-data   4620288 Feb 10 23:07 IMG_9638.MOV.ocTransferId1898601457.part
-rw-r--r-- 1 www-data www-data  41205760 Feb 10 23:27 IMG_9652.MOV.ocTransferId792284375.part
-rw-r--r-- 1 www-data www-data  86556672 Feb 11 07:29 IMG_9643.MOV.ocTransferId1068146182.part
-rw-r--r-- 1 www-data www-data  89440256 Feb 11 07:29 IMG_9642.MOV.ocTransferId1210872663.part
-rw-r--r-- 1 www-data www-data  93945856 Feb 11 07:29 IMG_9645.MOV.ocTransferId683328572.part
-rw-r--r-- 1 www-data www-data  86917120 Feb 11 07:29 IMG_9637.MOV.ocTransferId1065214817.part
-rw-r--r-- 1 www-data www-data 179355648 Feb 11 08:29 IMG_9652.MOV.ocTransferId266321277.part
-rw-r--r-- 1 www-data www-data 147931136 Feb 11 11:19 IMG_9652.MOV.ocTransferId156028721.part
-rw-r--r-- 1 www-data www-data 146948096 Feb 11 11:19 IMG_9637.MOV.ocTransferId2131332632.part
-rw-r--r-- 1 www-data www-data 147308544 Feb 11 11:19 IMG_9643.MOV.ocTransferId2127703825.part
-rw-r--r-- 1 www-data www-data 148340736 Feb 11 11:19 IMG_9642.MOV.ocTransferId105447803.part
-rw-r--r-- 1 www-data www-data 148062208 Feb 11 11:19 IMG_9645.MOV.ocTransferId2024427894.part
-rw-r--r-- 1 www-data www-data 288096256 Feb 11 12:19 IMG_9652.MOV.ocTransferId1624452905.part
-rw-r--r-- 1 www-data www-data 157147136 Feb 11 13:42 IMG_9645.MOV.ocTransferId926987446.part
-rw-r--r-- 1 www-data www-data 161660928 Feb 11 13:42 IMG_9652.MOV.ocTransferId199760058.part
-rw-r--r-- 1 www-data www-data 156090368 Feb 11 13:42 IMG_9637.MOV.ocTransferId1907450953.part
-rw-r--r-- 1 www-data www-data 157024256 Feb 11 13:42 IMG_9643.MOV.ocTransferId1806899657.part
-rw-r--r-- 1 www-data www-data 161857536 Feb 11 13:42 IMG_9642.MOV.ocTransferId1266106710.part
-rw-r--r-- 1 www-data www-data  79855616 Feb 12 00:36 IMG_9645.MOV.ocTransferId1374116373.part
-rw-r--r-- 1 www-data www-data  79724544 Feb 12 00:36 IMG_9652.MOV.ocTransferId823020438.part
-rw-r--r-- 1 www-data www-data  79839232 Feb 12 00:36 IMG_9643.MOV.ocTransferId13291596.part
-rw-r--r-- 1 www-data www-data  85606400 Feb 12 00:36 IMG_9642.MOV.ocTransferId1436716241.part
-rw-r--r-- 1 www-data www-data  79675392 Feb 12 00:36 IMG_9637.MOV.ocTransferId89226508.part
root@www1:/qflibrary/sync/liz/files/Maria Wedding# 

@Mike-Benoit
Copy link

We are seeing this issue too in v25.0.4

@pvogt09
Copy link

pvogt09 commented Apr 10, 2023

Me too in 25.0.3. Mostly for one large file (1.3GB) that could not be uploaded several times by the desktop client because of timeouts. The .part files stay for months.

@szaimen szaimen added 27-feedback and removed needs info stale Ticket or PR with no recent activity labels Sep 13, 2023
@szaimen szaimen reopened this Sep 13, 2023
@joshtrichards joshtrichards changed the title Failed upload .part-files remain on file system, no auto remove Automatically clean-up leftover .part files after permanently failed failed uploads Jul 29, 2024
@joshtrichards joshtrichards changed the title Automatically clean-up leftover .part files after permanently failed failed uploads Automatically clean-up leftover .part files after permanently failed uploads Jul 29, 2024
@joshtrichards joshtrichards added the needs review Needs review to determine if still applicable or covered by other Issues label Sep 5, 2024
@joshtrichards
Copy link
Member

Sort of related: #29841

@joshtrichards
Copy link
Member

joshtrichards commented Oct 30, 2024

For non-public (logged in) uploads, there is a daily job that runs and cleans up .part files:

// Run once a day
$this->setInterval(60 * 60 * 24);
$this->setTimeSensitivity(self::TIME_INSENSITIVE);

It removes .part files older than one day:

// Remove if all files have an mtime of more than a day
$time = $this->time->getTime() - 60 * 60 * 24;

@joshtrichards joshtrichards changed the title Automatically clean-up leftover .part files after permanently failed uploads Automatically clean-up leftover .part files after failed public uploads Oct 30, 2024
@joshtrichards joshtrichards removed the needs review Needs review to determine if still applicable or covered by other Issues label Oct 30, 2024
@joshtrichards joshtrichards changed the title Automatically clean-up leftover .part files after failed public uploads Automatically clean-up leftover .part files after failed uploads Oct 30, 2024
@joshtrichards joshtrichards changed the title Automatically clean-up leftover .part files after failed uploads Automatically clean-up leftover .part files after failed uploads to shared folders Oct 30, 2024
@joshtrichards
Copy link
Member

Might be this if this is only happening with shared folders:

$this->jobList->add(UploadCleanup::class, ['uid' => $this->userSession->getUser()->getUID(), 'folder' => $folder]);

@joshtrichards joshtrichards added the hotspot: file transfer performance upload & download performance related optimizations label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: dav hotspot: file transfer performance upload & download performance related optimizations
Projects
None yet
Development

No branches or pull requests

7 participants