Skip to content

Socket leak #615

@mpup371

Description

@mpup371

Hello,
I have an application that upload files to a remote server using sftp. I upload files with io.Copy().
Last night the remote server had his file system full, causing io.Copy return SSH_FX_FAILURE error.

At each error we retry the upload with the same connection considering the connection is ok. But at the end, after a while, the process fall with "too many open files". Using lsof on the process I found thousands of opened socket on the remote server. (reproducible)

It seems that when there is an error on a connection, the socket remains opened and the library open a new socket, causing leaking.
Can you confirm that ? is it "normal" behavior ?
thanks for you answer.
jf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions