Sonarr tries to process partially-complete file, mangles it

I have a setup that seems to be conflicting with the way Sonarr operates.

I download files on a remote server, and when they’re complete, they are automatically transferred to my home watch folder that Sonarr looks at to process the files. I have it set to hard link them.

Unfortunately, I found that since it’s a remote server, the transfers take a long time, and it tries to process the partially-completed transfers, and it totally craps out:

System.IO.IOException: File move incomplete, data loss may have occurred. [/mnt/shows/*/Season 7/.720p.HDTV.X264-UAV.mkv] was 313397248 bytes long instead of the expected 286044160.

At that point, it seems to delete the original (???) leaving me with nothing at all.

Does someone have any advice on how to solve this issue?

Use something like Web Drive or SSHFS to mount the remote share and let Sonarr transfer it, Sonarr doesn’t know that the transfer is in the middle, the log message is a check to make sure the full transfer of the file happened, but in this case since it gets the file size before the move then sees checks the file size of the copied file it sees them as different and warns about it.

are we talking about a CIFS/samba mount on linux? or some custom transfer your doing?

Edit: there is a known problem with large transfers with mono+CIFS, we tell mono to ‘move’ the file. which sometimes goes wrong. we’re actually not deleting the original, mono+CIFS does.
Best remedy is to simply use something else, NFS for example.

Edit2: Ignore me, this is a custom transfer issue. not mono+CIFS, the watch folder should never contain partial files. copy it to another directory first.

Yeah, it’s a custom setup I have going, by necessity - all linux.

I’m having a hard time figuring out a solution to this. I guess there’s no way to not make Sonarr freak out on the incomplete files?

Any ideas of how to handle this? I’m not quite sure how to set something up so that Sonarr is only ever scanning the complete files.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.