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

FTPError: 421 No transfer timeout #21

Open
ruucm opened this issue Feb 7, 2022 · 3 comments
Open

FTPError: 421 No transfer timeout #21

ruucm opened this issue Feb 7, 2022 · 3 comments

Comments

@ruucm
Copy link

ruucm commented Feb 7, 2022

It occurs with "Server sent FIN packet error." (of basic-ftp)

I found it occurs when this package creates folders for a long time.

Usually, when combined with GitHub actions, it takes over 10 minutes to create 200 ~ 300+ folders.

@ruucm
Copy link
Author

ruucm commented Feb 7, 2022

Here is a rapid solution to resolve this, but we need a better solution.

Changing syncProvider.ts like below.

...

 // create new folders
  for (const file of diffs.upload.filter(item => item.type === "folder")) {
      await this.createFolder(file.name);
      await this.uploadFile('dummy.txt', "upload"); // to prevent "421 No transfer timeout"
  }

...

@SamKirkland
Copy link
Owner

This is a common error, it's due to routers/firewalls killing the connection. It happens on large file uploads as well but is dependent on the network from github->ftp server so it's extremely hard to recreate.

We can send a NOOP command via basic-ftp. I'd like to have a generalized solution because as I said this is a problem on more than just folder creation.

Have you been able to recreate this only when creating a large number of files?

NOOP FTP command

The NOOP command does not cause the server to perform any action beyond acknowledging the receipt of the command. This command can be issued to the server to prevent the client from being automatically disconnected for being idle. It can also prevent modern routers/firewalls from closing a connection that it perceives as being idle as well.

Common responses:

421
500

@ruucm
Copy link
Author

ruucm commented Feb 8, 2022

Yes, I faced this issue an only a large number of files with a lot of subdirectories. (like deploying built files.)

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

2 participants