Hi All,
I’m trying to upload a file with 350Mb using curl but it can only transfer ~40% of the total size.
OpenSUSE 12.2, no firewall or such enabled
# curl -k -T image.tar -u root:ass sftp://192.168.5.213:/var/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
41 351M 0 0 41 146M 0 6580k 0:00:54 0:00:22 0:00:32 2855k
curl stops at 41% and upload speed decrease to 0k, the connection keeps stablished
# curl --version
curl 7.25.0 (i586-suse-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 libssh2/1.4.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
# uname -a
Linux linux-yyug 3.4.6-2.10.1-pae #1 SMP Thu Jul 26 06:36:26 BRT 2012 (641c197) i686 i686 i386 GNU/Linux
scp copy works
# scp image.tar 192.168.5.213:/var/
The authenticity of host ‘192.168.5.213 (192.168.5.213)’ can’t be established.
RSA key fingerprint is xxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.5.213’ (RSA) to the list of known hosts.
Password:
image.tar 100% 351MB 22.0MB/s 00:16
running the curl command with strace, it shows poll timeout
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
send(4, “\3707\3679x/|\r\203\352\207\306\344u\1\346C^9\264k o\210\242TeWg\227\325\206”…, 16452, M SG_NOSIGNAL) = 16452
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {4318, 499701085}) = 0
clock_gettime(CLOCK_MONOTONIC, {4318, 499719386}) = 0
clock_gettime(CLOCK_MONOTONIC, {4318, 499738099}) = 0
poll({fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 1000) = 1 ({fd=4, revents=POLLIN|POL LRDNORM}])
poll({fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ({fd=4, revents=POLLOUT|POLLWRNORM}])
time(NULL) = 1353937011
recv(4, “\306\v6”\276\3470;\35\5\2620\257\204\251\214jl\330\321F~\27_\356\262\343\5\367(\211\v"…, 16384, MSG_NOSIGNAL) = 68
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {4318, 501271622}) = 0
clock_gettime(CLOCK_MONOTONIC, {4318, 501289383}) = 0
clock_gettime(CLOCK_MONOTONIC, {4318, 501308415}) = 0
poll({fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 1000) = 0 (Timeout)
poll({fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ({fd=4, revents=POLLOUT|POLLWRNORM}])
time(NULL) = 1353937012
recv(4, 0x9de5e58, 16384, MSG_NOSIGNAL) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {4319, 503479166}) = 0
clock_gettime(CLOCK_MONOTONIC, {4319, 503515745}) = 0
) = 1
write(2, " ", 1 ) = 1
write(2, “4”, 14) = 1
write(2, “1”, 11) = 1
write(2, " ", 1 ) = 1
write(2, " ", 1 ) = 1
…