Skip to content

Inserting object fails on 'Connection closed'  #95

@yosefd

Description

@yosefd

On attempt to insert object after a period of time collection is not used, I experience failure with the error above.

It looks that mongolian keeps TCP connection to the server, but doesn't identify the connection was closed. On attempt to write into the socket, it probably identifies that the connection was closed and returns failure. It also takes time before error is returned (probably TCP resends timeout).

I run into this problem probably because of network components standing between client and mongo. I suspect that Azure load balancer closes TCP connections, though i am not sure.

Assuming server disconnects in such a way you don't get any notification from the network stack, I think you should attempt to reconnect and to fail only if reconnect fails.

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