Skip to content

Issue with the proposed fix #1

Open
@manishbansal8843

Description

@manishbansal8843

I am glad i am not the first one to face this issue but this did gave me little cry. Anyway, i also did the good amount of analysis and i am glad our views match. However the solution proposed by you looks brittle and will only delay the issue but won't solve it

I feel there could be below 2 reasons for this issue to occur.

  1. Sftp network is slow.
  2. The client machine does not have enough resources due to which it cannot prioritize the session thread.
    Due to any of the above reasons, it might happen that there is no data for piped input stream to read and hence it straight goes to session.write method waiting for window to get resized.
    Now in this case, even if you increase input buffer, it might fill eventually.

I feel it would be better if the file writing thread should simply wait for the acknowledgements from remote sftp once the remote window is diminished. This way it will make sure that once it goes for waiting rw resizing message, input buffer will never fill no matter what size it has.
What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions