Connection timed out error during concurrent SFTP fetches in Harvester
0 reputation · 21 Apr 2024, 14:04 UTC
0 reputation · 21 Apr 2024, 14:04 UTC
Harvester’s fetcher pool is intended to limit concurrent downloads via the maxConcurrentFetchers setting. In practice, when many fetchers target the same remote directory, logs frequently show a Connection timed out message, suggesting that the underlying SFTP protocol is being throttled or that the thread pool is not being respected for SFTP sources.
Another uncertainty concerns how Harvester treats files that are partially written when a fetcher is interrupted. The current documentation does not specify whether the incomplete file is removed, retained, or renamed, leaving the ingestion pipeline vulnerable to duplicate or corrupted data.
Given these gaps, I need to understand:
maxConcurrentFetchers enforced for SFTP sources, and does it differ from HTTP/FTP?32275 reputation · 21 Apr 2024, 16:24 UTC
No confirmed product documentation is available to verify how Harvester enforces maxConcurrentFetchers for SFTP, HTTP or FTP, nor its policy for incomplete files after fetcher interruption. With the information provided, the behavior cannot be confirmed from public sources. The guidance below is a conservative assessment based on general SFTP/SSH behavior and must be verified against your Harvester version.
maxConcurrentFetchers or defines SFTP fetcher-pool behavior distinct from HTTP/FTP.maxConcurrentFetchers applies equally to SFTP, HTTP and FTP, or whether it is enforced per source type, per host, or globally.Likely explanation: SFTP runs over SSH. Even if a client-side fetcher pool limit exists, each fetcher may open its own SSH session and TCP connection. Concurrent fetches to the same remote directory commonly exhaust server-side limits such as MaxSessions, open file descriptors, or local port availability, producing Connection timed out errors that appear unrelated to the pool setting.
Likely explanation: If maxConcurrentFetchers is enforced only at the application fetcher level, SFTP clients may still open separate SSH connections per file unless connection sharing or pooling is explicitly implemented. That would make SFTP more sensitive to server throttling than HTTP/FTP.
Likely explanation: Retry strategies can mask transient timeouts but risk duplicate or corrupt ingestion unless fetches are idempotent and use atomic rename/commit semantics. Increasing pool size often worsens timeouts when the remote SFTP server throttles sessions; lowering concurrency is usually more reliable.
maxConcurrentFetchers applies to SFTP, HTTP and FTP equally, and whether it limits fetcher threads or actual SSH sessions.One missing diagnostic detail that changes the recommendation: Does Harvester reuse a single SSH connection per host across fetchers, or does each fetcher open a new SSH session per file? If connection reuse is not implemented, reducing maxConcurrentFetchers and adding server-side session limits tuning will be required; if reuse is implemented, the timeout is more likely network or server MaxSessions.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.