#17711 closed Bugs (Fixed)

SFTP timeouts whenever the NAS has to spinup its disk

Reported by: oliver.joos Owned by:
Priority: 4 - Normal
Component: Streaming (Local) Version: 17.4 "Krypton" final
Severity: Normal Keywords:
Cc: Blocked By:
Blocking: Platform: All

Description (last modified by oliver.joos)

I am using Kodi to play videos from a NAS through SFTP protocol.
(Kodi 17.5 in OSMC on a RaspberryPi 3 and a Synology DS115j with one 3.5" WD Red 2TB harddisk)

My problem: after my NAS is not used for 15 minutes, its harddisk stops spinning. Now when I try to start a video then I hear the disk spinning up. But before the NAS is ready, Kodi gives up and shows a dialog that this video is no longer available asking to remove it from library. Retrying it immediately shows the same dialog (although the NAS would be ready now). Retying it after 2-3 minutes does work and then everything works as expected!

I saw on Github master branch that SFTP_TIMEOUT is set to 5 seconds in
This timeout is used in CSFTPSession::Connect()

I guess increasing SFTP_TIMEOUT to at least 10 seconds could solve this problem. 10 seconds should be enough even for slow NAS with multiple disks.

I found commits in June 2017 where timeouts of samba and libcurl were increased from 10 to 30

I tried to set a higher SSH "ConnectTimeout" and/or "ConnectionAttempts" in "~/.ssh/config". But this does not make any difference. I think the Kodi code does not use this file. (other SSH/SFTP clients do use it)

Change History (4)

comment:1 Changed at 2018-01-07T22:01:46Z by oliver.joos

  • Description modified (diff)

comment:2 Changed at 2018-05-21T13:26:34+01:00 by oliver.joos

This is still an issue in Kodi 17.6 of April 2018.

comment:3 Changed at 2018-08-06T08:34:17+01:00 by Rechi

  • Milestone changed from Pending / Future to 18.0 "L*****"
  • Resolution set to Fixed
  • Status changed from new to closed

SFTP support isn't a core feature anymore in v18, but the binary addon was adjusted at https://github.com/notspiff/vfs.sftp/pull/7.

comment:4 Changed at 2018-08-08T20:32:09+01:00 by Martijn

  • Milestone changed from 18.0 "L*****" to 18.0 "Leia"

Milestone renamed

Note: See TracTickets for help on using tickets.