@@ -30,7 +30,7 @@ download:
3030 # rateLimit is the default rate limit of the download speed in KiB/MiB/GiB per second, default is 10GiB/s.
3131 rateLimit : 10GiB
3232 # pieceTimeout is the timeout for downloading a piece from source.
33- pieceTimeout : 30s
33+ pieceTimeout : 60s
3434 # concurrentPieceCount is the number of concurrent pieces to download.
3535 concurrentPieceCount : 10
3636
@@ -76,9 +76,36 @@ scheduler:
7676 # Announcer will provide the scheduler with peer information for scheduling,
7777 # peer information includes cpu, memory, etc.
7878 announceInterval : 10s
79- # scheduleTimeout is the timeout for scheduling. If the scheduling timesout, dfdaemon will back-to-source
80- # download if enableBackToSource is true, otherwise dfdaemon will return download failed.
81- scheduleTimeout : 30s
79+ # schedule_timeout is timeout for the scheduler to respond to a scheduling request from dfdaemon, default is 3 hours.
80+ #
81+ # If the scheduler's response time for a scheduling decision exceeds this timeout,
82+ # dfdaemon will encounter a `TokioStreamElapsed(Elapsed(()))` error.
83+ #
84+ # Behavior upon timeout:
85+ # - If `enable_back_to_source` is `true`, dfdaemon will attempt to download directly
86+ # from the source.
87+ # - Otherwise (if `enable_back_to_source` is `false`), dfdaemon will report a download failure.
88+ #
89+ # **Important Considerations Regarding Timeout Triggers**:
90+ # This timeout isn't solely for the scheduler's direct response. It can also be triggered
91+ # if the overall duration of the client's interaction with the scheduler for a task
92+ # (e.g., client downloading initial pieces and reporting their status back to the scheduler)
93+ # exceeds `schedule_timeout`. During such client-side processing and reporting,
94+ # the scheduler might be awaiting these updates before sending its comprehensive
95+ # scheduling response, and this entire period is subject to the `schedule_timeout`.
96+ #
97+ # **Configuration Guidance**:
98+ # To prevent premature timeouts, `schedule_timeout` should be configured to a value
99+ # greater than the maximum expected time for the *entire scheduling interaction*.
100+ # This includes:
101+ # 1. The scheduler's own processing and response time.
102+ # 2. The time taken by the client to download any initial pieces and download all pieces finished,
103+ # as this communication is part of the scheduling phase.
104+ #
105+ # Setting this value too low can lead to `TokioStreamElapsed` errors even if the
106+ # network and scheduler are functioning correctly but the combined interaction time
107+ # is longer than the configured timeout.
108+ scheduleTimeout : 3h
82109 # maxScheduleCount is the max count of schedule.
83110 maxScheduleCount : 5
84111 # enableBackToSource indicates whether enable back-to-source download, when the scheduling failed.
0 commit comments