Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is Upload / Download so slow? #454

Open
mat01 opened this issue Jan 9, 2019 · 80 comments
Open

Why is Upload / Download so slow? #454

mat01 opened this issue Jan 9, 2019 · 80 comments

Comments

@mat01
Copy link

mat01 commented Jan 9, 2019

I am connecting via FTP on port 21 to a micro EC2 instance on AWS.

Upload and Downloading files is hilariously slow. I would say both upload and download for 1 small text file takes 20 - 30 seconds.

Is this a bug, or is there something I can tweek?

@liximomo
Copy link
Owner

Extension Logs from Startup - required

  1. Open User Settings.

    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
  2. Set sftp.debug to true and reload vscode.

  3. Reproduce the problem, get the logs from View > Output > sft

@mat01
Copy link
Author

mat01 commented Jan 10, 2019

[info] config at c:\Users\mat01\xxxxxxxxxxx {"remotePath":"/","uploadOnSave":true,"downloadOnOpen":false,"ignore":[],"concurrency":1,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"passive":false,"remoteTimeOffsetInHours":0,"port":21,"name":"xxxxxxx","host":"xxxxxxx","username":"","password":""}
[debug] < '220 (vsFTPd 2.2.2)\r\n'
[debug] > USER ftpuser
[debug] < '331 Please specify the password.\r\n'
[debug] > PASS ******
[debug] < '230 Login successful.\r\n'
[debug] > FEAT
[debug] < '211-Features:\r\n'
[debug] < ' EPRT\r\n EPSV\r\n MDTM\r\n'
[debug] < ' PASV\r\n REST STREAM\r\n SIZE\r\n'
[debug] < ' TVFS\r\n UTF8\r\n211 End\r\n'
[debug] > TYPE I
[debug] < '200 Switching to Binary mode.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,22).\r\n'
[debug] > NOOP
[debug] > LIST /
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,19).\r\n'
[debug] > NOOP
[debug] > LIST /app
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[trace] run command 'Edit In Local'
[trace] handle download file for c:\Users\mat01\xxxxxxxxxx\app\Permission.php
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,22).\r\n'
[debug] > NOOP
[debug] > LIST /app
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,10).\r\n'
[debug] > NOOP
[debug] > RETR /app/Permission.php
[debug] < '150 Opening BINARY mode data connection for /app/Permission.php (390 bytes).\r\n'
[debug] < '226 Transfer complete.\r\n'
[debug] > MODE S
[debug] < '200 Mode set to S.\r\n'
[info] remote -> local c:\Users\mat01\xxxxxxxxxx\app\Permission.php

@liximomo
Copy link
Owner

[debug] < '220 (vsFTPd 2.2.2)\r\n'
[debug] > USER ftpuser
[debug] < '331 Please specify the password.\r\n'
[debug] > PASS ******
[debug] < '230 Login successful.\r\n'
[debug] > FEAT
[debug] < '211-Features:\r\n'
[debug] < ' EPRT\r\n EPSV\r\n MDTM\r\n'
[debug] < ' PASV\r\n REST STREAM\r\n SIZE\r\n'
[debug] < ' TVFS\r\n UTF8\r\n211 End\r\n'
[debug] > TYPE I
[debug] < '200 Switching to Binary mode.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,22).\r\n'
[debug] > NOOP
[debug] > LIST /
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,19).\r\n'
[debug] > NOOP
[debug] > LIST /app
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[trace] run command 'Edit In Local'
[trace] handle download file for c:\Users\mat01\xxxxxxxxxx\app\Permission.php
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,22).\r\n'
[debug] > NOOP
[debug] > LIST /app
[debug] < '150 Here comes the directory listing.\r\n'
[debug] < '226 Directory send OK.\r\n'
[debug] > PASV
[debug] < '227 Entering Passive Mode (81,98,222,74,4,10).\r\n'
[debug] > NOOP
[debug] > RETR /app/Permission.php
[debug] < '150 Opening BINARY mode data connection for /app/Permission.php (390 bytes).\r\n'
[debug] < '226 Transfer complete.\r\n'
[debug] > MODE S
[debug] < '200 Mode set to S.\r\n'

Which part takes 20 - 30 seconds?

@mat01
Copy link
Author

mat01 commented Jan 13, 2019

I think there are two operations here, a directory list, and a file download. Both are part of 1 action (edit file locally) from VSC. The whole lot took 20 to 30 seconds.

I'm afraid I don't know exactly which commands are the slowest - as you can see, there are no timestamps on the log.

@liximomo
Copy link
Owner

liximomo commented Jan 14, 2019

there are no timestamps on the log.

But there are time gaps between each log.

[debug] > LIST /
[debug] < '150 Here comes the directory listing.\r\n'

Does the second line take 10s to show after the first one?

@mat01
Copy link
Author

mat01 commented Jan 14, 2019

The biggest delay seems to happen after
'227 Entering Passive Mode (81,98,222,74,4,21).\r\n'

Since there are 2 of these during one file fetch, I'm get 2x12 seconds delay.

@liximomo
Copy link
Owner

Turn on Passive mode in your FTP server.

@mat01
Copy link
Author

mat01 commented Jan 15, 2019

Valuable advice, thank you.

Here's an extract (last few lines) from my vsftpd .conf file.

pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048

Since, there is no error message on the debug log after 'entering passive mode', surely we must assume that passive mode was successfully (although slowly) entered?

Furthermore - I've just tested our server by connecting to FTP via another client - WinSCP. This works flawlessly downloading a file in well under a second.

So, this all points to your extension not working properly (I guess that's not the case), or a setting within it being incorrect.

My config file in vscode is

{
"name": "xxx",
"protocol": "ftp",
"host": "xx.xx.xx.xx",
"username": "username",
"password": "password",
"port":21,
"remotePath": "/",
"uploadOnSave": true
}

Please advise.

@mat01
Copy link
Author

mat01 commented Jan 18, 2019

Hello? Any word on this please?

@Ploppy3
Copy link

Ploppy3 commented Feb 13, 2019

Same problem, no error, just downloading 1 file every 10 seconds or so.

[debug] > PASV
[debug] < '227 Entering Passive Mode (185,216,26,23,117,96).\r\n'
[debug] > RETR /path/to/file.json
[debug] < '150 Opening BINARY mode data connection for /path/to/file.json (77 bytes)\r\n'
[debug] < '226 Transfer complete\r\n'
[debug] > MODE S
[debug] < '200 Mode set to S\r\n'
[info] remote -> local c:\path\to\file.json

@CWSmart
Copy link

CWSmart commented Feb 15, 2019

I have a similar problem, taking up to 23 seconds to download a file. Using Filezilla, there is no delay at all.

This is where it hangs:
[debug] < '227 Entering Passive Mode (xxx,xxx,xxx,xxx).\r\n'
[debug] > RETR /public_html/xxx/xxx/xxxxxxphp
[debug] < '150 Opening BINARY mode data connection for /public_html/xxx/xxx/xxx.php (575 bytes)\r\n'

About 18 seconds later it continues and completes:

[debug] < '226 Transfer complete\r\n'
[debug] > MODE S
[debug] < '200 Mode set to S\r\n'
[info] remote -> local c:\wamp\www\xxx\xxx\xxx\xxx.php

As can be seen this is 600byte file

This problem occurs over many different servers.

I have just tested on my laptop and the problem starts once VSCode upgrades to 1.31.1 Jan 2019 Update

I have also tried this with NO other extentions loaded, to make sure that there is not a conflict somewhere. It still can take up to 35 seconds to fetch a 6k file when I open it locally.
It is also liable to call data loss locally when you close the file before it downloads. I have a habit of hitting Ctrl S before closing anything and this saves a blank file.

My config is as follows:

{
"name": "SFTP Test",
"protocol": "ftp",
"host": "rem.ote.ser.ver",
"username": "xxxxxxxx",
"password": "*********",
"port": 21,
"remotePath": "/public_html/sftptest/",
"uploadOnSave": true,
"downloadOnOpen": true
}

@boneus
Copy link

boneus commented Feb 19, 2019

I have that problem too. Really weird.

@piliop
Copy link

piliop commented Feb 19, 2019

Same problem Here. Problem appears only for remote->local(Download). For uploding Everything seems and works fine. Problem appears after the update to 1.31.1

@kieliszek85
Copy link

Same problem here.
In debug mode the longest delay is after "opening binay mode data connection".

[info] remote -> local d:\some.file
[debug] > PASV
[debug] < '227 Entering Passive Mode (xxxxxxxxxxxxx).\r\n'
[debug] > RETR /domains/some.file
[debug] < '150 Opening BINARY mode data connection for /domains/some.file (20126 bytes)\r\n'

Here it hangs for 5-60secs and it shows:
[debug] < '226 Transfer complete\r\n'
[debug] > MODE S
[debug] < '200 Mode set to S\r\n'

And it goes to next file...

My vscode bersion is 1.31.1.
Do anyone have solution for this?

@bebeGit
Copy link

bebeGit commented Feb 28, 2019

Same here. All downloads go to PASV mode and every action on the server i.e. Opening BINARY mode data connection for [...] takes forever. Hosting and therefore FTP-Server is at Checkdomain.

@philmarty
Copy link

Hello, same problem for me.
Loooong delay before downloading from server. But for the same server, really fast on Filezilla.
Weird.

@xtremforce
Copy link

Same here. Super fast on other FTP client.

@abudawud
Copy link

abudawud commented Mar 29, 2019

same here, taking very long time every file download.
i'm using vscode version 1.32.3-1552607091.el7 on fedora 29

@abudawud
Copy link

abudawud commented Apr 1, 2019

same here, taking very long time every file download.
i'm using vscode version 1.32.3-1552607091.el7 on fedora 29

Problem solved by down grade my vscode version to 1.30.2-1546901769.el7.

@kieliszek85
Copy link

@liximomo do you have any update on this issue?

@trenccan777
Copy link

I have the same issue. Great plugin but the download speed is very slow. I hope you manage to fix it. Thank you very much in advance.

@kieliszek85
Copy link

@liximomo I found out that it has something in common with the project I use.
If project is relatively small (or not regularly opened) then it works ok.
If project is big then it happens to download files very slowly.
I have no idea if it can be related to other plugin like 'intelephense' but other plugins work without issues.

@trenccan777
Copy link

What if is this a problem with operating system? Maybe firewall. I'm using Windows 10. I also tried FTP-Sync addon and the speed is also very slow.

@PetrKapishev
Copy link

The same problem. MacOS Mojave.

@zigojacko
Copy link

Same problem here. Any project takes ages to download either a single file or a directory of files etc.

Whether SFTP or FTP...

@hesos
Copy link

hesos commented Apr 25, 2019

My case seems related, i hope this helps fix this.
I'm connecting to a m4.2xlarge in amazon.
This is what's happening to me:

[debug] < '150 Opening BINARY mode data connection for /public_html/xxxxxx/xx.php (5713 bytes)\r\n'

The file appears in the folder almost instantly and i can open it with another editor checking is full downloaded

10-20 seconds waiting

[debug] < '226 Transfer complete\r\n'

The file opens in vscode.

@AndryWJ
Copy link

AndryWJ commented Apr 29, 2019

An extension in which the maximum number of installations has such a serious compatibility problem with vscode 1.31 and higher is sadness ... in fact, it is impossible to use the extension because of downloading a small file in 20-30 seconds.

@Balya
Copy link

Balya commented May 2, 2019

Same problem on VSCode 1.33.1
The problem is observed in Remote -> local mode. In the opposite direction, everything happens without any trouble.
Tried to use VSCode 1.34.0-insider - the problem is the same.

Downgrading to version 1.30.2 solves the problem. Do not forget to turn off automatic updates.

@krzysmierz
Copy link

Yeah downgrade to 1.30.x solved for me also...

Any chance soon to solve this problem with compatibility ???
Thanks and send much love ;)

@liximomo
Copy link
Owner

liximomo commented May 9, 2019

@krzysmierz It seems that this is related to vscode. 🤔

@Carlos-Freire
Copy link

Carlos-Freire commented Mar 9, 2020

[SOLVED]
Same problem here.
VSCode 1.42.1, MacOs Mojave.
Upload on save ok, fast; Download... NOOP.
Server parameters ok, Filezilla or SFTP for Sublime Text = no problems.

I solved this (and replied in another GIT post - forgot where).
Very simple: add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.

My sftp.json:
{
"name": "myHostName",
"host": "myHostip",
"protocol": "sftp",
"port": 22,
"username": "myUserName",
"remotePath": "/Applications/XAMPP/xamppfiles/htdocs/myHostFolder/",
"interactiveAuth": true,
"password": "myPassword",
"uploadOnSave": true
}
Note: I don't tested whithout line "password", but... I think it is not more necessary.

@kmartin26
Copy link

Same problem for me...
VSCode 1.43.2, macOS Catalina
Upload files fast but download/sync works very slowly...

@Balya
Copy link

Balya commented Mar 26, 2020

Add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.

In my case, this did not work. The problem is also relevant.
Windows 10, VSCode 1.43.2

[03-26 04:50:45] [debug] < '150 Opening BINARY mode data connection for file list\r\n'
[03-26 04:50:45] [debug] < '226 Transfer complete\r\n'
[03-26 04:50:45] [debug] > PASV
[03-26 04:50:45] [debug] < '227 Entering Passive Mode (178,170,244,77,137,200).\r\n'
[03-26 04:50:45] [debug] > RETR /test.php
[03-26 04:50:45] [debug] < '150 Opening BINARY mode data connection for /test.php (4231 bytes)\r\n'
[03-26 04:51:15] [debug] < '226 Transfer complete\r\n'
[03-26 04:51:15] [debug] > MODE S
[03-26 04:51:15] [debug] < '200 Mode set to S\r\n'
[03-26 04:51:15] [info] remote ➞ local c:\Projects\proland\test.php```

@dmoibm
Copy link

dmoibm commented Mar 26, 2020

Same problem for me...
VSCode 1.43.2, macOS Catalina
Upload files fast but download/sync works very slowly...

Add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.

My sftp.json:
{
"name": "myHostName",
"host": "myHostip",
"protocol": "sftp",
"port": 22,
"username": "myUserName",
"remotePath": "/Applications/XAMPP/xamppfiles/htdocs/myHostFolder/",
"interactiveAuth": true,
"password": "myPassword",
"uploadOnSave": true
}
Note: I don't tested whithout line "password", but... I think it is not more necessary.

With SFTP I dont have any problems. The problem exist only with FTP! And there is interactiveAuth not helpfull.
Any solution that works?

@Carlos-Freire
Copy link

Carlos-Freire commented Mar 28, 2020

Same problem for me...
VSCode 1.43.2, macOS Catalina
Upload files fast but download/sync works very slowly...

Add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.
My sftp.json:
{
"name": "myHostName",
"host": "myHostip",
"protocol": "sftp",
"port": 22,
"username": "myUserName",
"remotePath": "/Applications/XAMPP/xamppfiles/htdocs/myHostFolder/",
"interactiveAuth": true,
"password": "myPassword",
"uploadOnSave": true
}
Note: I don't tested whithout line "password", but... I think it is not more necessary.

With SFTP I dont have any problems. The problem exist only with FTP! And there is interactiveAuth not helpfull.
Any solution that works?

Hi .. Sorry, but my FTP always worked fine (my problem only was the SFTP).
Below, my sftp.json whith FPT parameters:
Note the absence of line x; it didn't prove necessary.

{
"name": "SkyMail",
"host": "webwindows3.skymail.net.br",
"protocol": "ftp",
"port": 21,
"username": "myusername",
"password": "mypass",
"remotePath": "/",
"uploadOnSave": true
}

@Carlos-Freire
Copy link

Add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.

In my case, this did not work. The problem is also relevant.
Windows 10, VSCode 1.43.2

[03-26 04:50:45] [debug] < '150 Opening BINARY mode data connection for file list\r\n'
[03-26 04:50:45] [debug] < '226 Transfer complete\r\n'
[03-26 04:50:45] [debug] > PASV
[03-26 04:50:45] [debug] < '227 Entering Passive Mode (178,170,244,77,137,200).\r\n'
[03-26 04:50:45] [debug] > RETR /test.php
[03-26 04:50:45] [debug] < '150 Opening BINARY mode data connection for /test.php (4231 bytes)\r\n'
[03-26 04:51:15] [debug] < '226 Transfer complete\r\n'
[03-26 04:51:15] [debug] > MODE S
[03-26 04:51:15] [debug] < '200 Mode set to S\r\n'
[03-26 04:51:15] [info] remote ➞ local c:\Projects\proland\test.php```

Sorry, I don't can help you... My OS is MacOs.

@defrian
Copy link

defrian commented Apr 7, 2020

Same problem for me...
VSCode 1.43.2, macOS Catalina
Upload files fast but download/sync works very slowly...

Add the line:
"interactiveAuth": true;
On sftp.json, after the line of remote path.
The sftp plugin, on first action, question about the password; after, no more.
Working fine.
My sftp.json:
{
"name": "myHostName",
"host": "myHostip",
"protocol": "sftp",
"port": 22,
"username": "myUserName",
"remotePath": "/Applications/XAMPP/xamppfiles/htdocs/myHostFolder/",
"interactiveAuth": true,
"password": "myPassword",
"uploadOnSave": true
}
Note: I don't tested whithout line "password", but... I think it is not more necessary.

With SFTP I dont have any problems. The problem exist only with FTP! And there is interactiveAuth not helpfull.
Any solution that works?

Same here. FTP super slow although I set "interactiveAuth": true

@anburocky3
Copy link

Its 11, April - 2020. The problem exist still. I'm on VS Code 1.44.0 (System setup)

I use Google Cloud Compute Engine for server!

@Disday
Copy link

Disday commented Apr 23, 2020

I had same problem for several months. Just asked hosting provider to activate SFTP, reconfigured sftp.json for using SFTP and now download works as fast as it possible. 👍
Flying like rocket!

@gustavo-villalpando
Copy link

I share my case and what worked with me.

Case:
When I downloaded everything ok but when uploading it took up to 10 min.

Cause:
My host in sftp.json was just an alias which caused the connection to be insecure and slow.

Solution:
I show you an example of how I had my sftp.json and the change I had to make to correct the error

{
"name": "My Server",
"host": "domianalias.com",
"protocol": "ftp",
"port": 21,
"username": "myuser",
"password": "mypass",
"remotePath": "/public_html",
"secure": true, //<-- this would help u to know if u are using an alias as host
"uploadOnSave": true
}

When i use that sftp.json i get the next error:
errorvscodesftp
So what I had to do is change my host to the one shown in DNS (in this case server.realname.com).
And leave my sftp.json like this:

{
"name": "My Server",
"host": "server.realname.com", //<-- here the change
"protocol": "ftp",
"port": 21,
"username": "myuser",
"password": "mypass",
"remotePath": "/public_html",
"secure": true, //<-- this would help u to know if u are using an alias as host
"uploadOnSave": true
}

I hope this can help you as it helped me :)

@Yonglin5170
Copy link

I use sftp to download file from remote sever. And I have this problem, too.
I found a strange thing that when I make a new sftp connection to a NEW folder its speed is fast, but once I use remote ssh extension to the sever and open this folder its speed becomes very slow.
Anyone knows why? really appreciate it!

@artickc
Copy link

artickc commented Jul 13, 2020

stel no solution :(, very slow connection via ftp (21) sftp ok.

@artickc
Copy link

artickc commented Jul 13, 2020

"connectTimeout": 500
solve problem.
In my opinion the problem is in PASV. If server not support it, the connection will timeout and will enter in active mode.

@SNagel
Copy link

SNagel commented Sep 24, 2020

I have the very same problem ...

SFTP protocol seems to be all good.
But on a specific server i have no chance to get it activated, so i fall back to FTP protocol (with ssl/tls).

This is my current config:

{
"name": "myconnectionname",
"host": "my.host.name",
"protocol": "ftp",
"port": 21,
"username": "myusername",
"password": "mypassword",
"remotePath": "/myremotepath/",
"uploadOnSave": true,
"secure": true,
"secureOptions": {"rejectUnauthorized": false}
}

--> the "secure" and "secureOptions" parameter is set as the server only accepts ftp over tls/ssl and the certificate is self-signed. But it's the same slowdown with another server that accepts plain ftp.

--> I'm trying to sync from remote to local, but the slowdown is exactly the same when i try to download a single file or upload a file or sync it to remote after save.

This is a debug-mode activated output of two subsequent transfers (don't know where exactly one session starts and ends, so i'm pasting two loops here):

[09-24 10:42:45] [debug] > MODE S
[09-24 10:42:45] [debug] < '200 Mode set to S\r\n'
[09-24 10:42:45] [info] remote ➞ local /localpath/filename1.ext
[09-24 10:42:45] [debug] > PASV
[09-24 10:42:45] [debug] < '227 Entering Passive Mode (52,149,111,15,191,171).\r\n'
[09-24 10:42:45] [debug] > RETR /remotepath/filename1.ext
[09-24 10:42:45] [debug] < '150 Opening BINARY mode data connection for /remotepath/filename1.ext (2019 bytes)\r\n'
[09-24 10:43:15] [debug] < '226 Transfer complete\r\n'
[09-24 10:43:15] [debug] > MODE S
[09-24 10:43:15] [debug] < '200 Mode set to S\r\n'
[09-24 10:43:15] [info] remote ➞ local /localpath/filename2.ext
[09-24 10:43:15] [debug] > PASV
[09-24 10:43:15] [debug] < '227 Entering Passive Mode (52,149,111,15,191,171).\r\n'
[09-24 10:43:15] [debug] > RETR /remotepath/filename2.ext
[09-24 10:43:15] [debug] < '150 Opening BINARY mode data connection for /remotepath/filename2.ext (71350 bytes)\r\n'
[09-24 10:43:45] [debug] < '226 Transfer complete\r\n'

As you can see, there is always a 30 second gap between "150 Opening BINARY" and "226 Transfer complete", where it seems to idle and then time-out?
The files are tiny and the internet connection speed is around 25mbit-up/250mbit-down. So it can't really take exactly 30 seconds each time.

SFTP version: v1.12.9
VSCode version: 1.49.1
macOS version: 10.15.5 (19F101)

@seitz90
Copy link

seitz90 commented Nov 24, 2020

I have the very same problem ...

SFTP protocol seems to be all good.
But on a specific server i have no chance to get it activated, so i fall back to FTP protocol (with ssl/tls).

This is my current config:

{
"name": "myconnectionname",
"host": "my.host.name",
"protocol": "ftp",
"port": 21,
"username": "myusername",
"password": "mypassword",
"remotePath": "/myremotepath/",
"uploadOnSave": true,
"secure": true,
"secureOptions": {"rejectUnauthorized": false}
}

--> the "secure" and "secureOptions" parameter is set as the server only accepts ftp over tls/ssl and the certificate is self-signed. But it's the same slowdown with another server that accepts plain ftp.

--> I'm trying to sync from remote to local, but the slowdown is exactly the same when i try to download a single file or upload a file or sync it to remote after save.

This is a debug-mode activated output of two subsequent transfers (don't know where exactly one session starts and ends, so i'm pasting two loops here):

[09-24 10:42:45] [debug] > MODE S
[09-24 10:42:45] [debug] < '200 Mode set to S\r\n'
[09-24 10:42:45] [info] remote ➞ local /localpath/filename1.ext
[09-24 10:42:45] [debug] > PASV
[09-24 10:42:45] [debug] < '227 Entering Passive Mode (52,149,111,15,191,171).\r\n'
[09-24 10:42:45] [debug] > RETR /remotepath/filename1.ext
[09-24 10:42:45] [debug] < '150 Opening BINARY mode data connection for /remotepath/filename1.ext (2019 bytes)\r\n'
[09-24 10:43:15] [debug] < '226 Transfer complete\r\n'
[09-24 10:43:15] [debug] > MODE S
[09-24 10:43:15] [debug] < '200 Mode set to S\r\n'
[09-24 10:43:15] [info] remote ➞ local /localpath/filename2.ext
[09-24 10:43:15] [debug] > PASV
[09-24 10:43:15] [debug] < '227 Entering Passive Mode (52,149,111,15,191,171).\r\n'
[09-24 10:43:15] [debug] > RETR /remotepath/filename2.ext
[09-24 10:43:15] [debug] < '150 Opening BINARY mode data connection for /remotepath/filename2.ext (71350 bytes)\r\n'
[09-24 10:43:45] [debug] < '226 Transfer complete\r\n'

As you can see, there is always a 30 second gap between "150 Opening BINARY" and "226 Transfer complete", where it seems to idle and then time-out?
The files are tiny and the internet connection speed is around 25mbit-up/250mbit-down. So it can't really take exactly 30 seconds each time.

SFTP version: v1.12.9
VSCode version: 1.49.1
macOS version: 10.15.5 (19F101)

same here... i need 30 seconds per request, too...

@AndryWJ
Copy link

AndryWJ commented Nov 24, 2020

this problem will probably be while vscode is alive...

@Samuel88
Copy link

Same problem with VS Code 1.51.1

@michihochstetter
Copy link

Same problem with VS Code 1.52.1.
Would be nice to get a fix for this in 2021.

@tyai-a
Copy link

tyai-a commented Dec 27, 2020

Solved this problem.
I have not confirmed all the operations with SFTP and SSH.
Works with VSCode 1.52.1.
Sorry, I'm writing in Japanese.

https://github.com/tyai-a/vscode-sftp

@jeroenqui
Copy link

@tyai-a You should make a pull-request to the original repo with your fix!

@ghost
Copy link

ghost commented Jan 14, 2021

@jeroenqui, the problem is that it would probably never be merged. Seeing that the maintainer is inactive.

@tyai-a
Copy link

tyai-a commented Jan 25, 2021

@Bthompson90
Can I make a pull request to your repository ? (Reviving vscode-sftp)

@ghost
Copy link

ghost commented Jan 25, 2021

@tyai-a please! I've been neglecting it the past week, going to pick it back up today.

@FouPouDave
Copy link

FouPouDave commented Mar 25, 2021

Bonjour, comment on met à jour la version 1.12.9 vers la version 1.12.10 ?

Translate : Hello, how do we update version 1.12.9 to version 1.12.10 ?

@Gawrion
Copy link

Gawrion commented Apr 15, 2021

The same here.

[04-15 15:04:10] [debug] < '150 Opening BINARY mode data connection for /home/oodo/dev/include/head.php (2741 bytes)\r\n'
[04-15 15:04:41] [debug] < '226 Transfer complete\r\n'

@morasaiz
Copy link

"connectTimeout": 1000
in sftp.json
solve the problem for me!

@piliop
Copy link

piliop commented Jul 30, 2021

"connectTimeout": 1000 as morasaiz says works.

@abardik
Copy link

abardik commented Feb 8, 2022

"connectTimeout": 1000 solves the issue.

@webservices-nm
Copy link

I was seeing the same problem - long delays on Remote->Local FTP transfers. Same server didn't have issues in the past. And same server didn't have issues with other FTP clients.

What changed was that I added a Static IP to the server. While this seems specific to AWS and Filezilla, I'm guessing many people have this same issue when there's some sort of IP aliasing going on. CDN's, Static IP's, Firewalls etc.

I'm using Filezilla FTP Server on an AWS server, and there's a passive setting in the configuration.

The trick was to add the "Static IP" of the AWS server in the Host section of the Passive settings of the Filezilla server.

So: Server->Configure->FTP and FTP over TLS->Passive Mode->Use the following host->Static IP

@bharagavatushar
Copy link

bharagavatushar commented Aug 20, 2023

Solution is simple if someone is still struggling. Just change the (passive address) pasv_address="your_external_ip" on your FTP server. The problem is that the server is returning internal IP and the client waits for it to resolve or unless there is a timeout and it uses the IP of host.
If after changing the pasv_address on server it returns to 0,0,0,0 then stop listening to IPv6 at the server end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests