Skip to content

A method to reset connection #189

@fingolfin0

Description

@fingolfin0

Description of problem

In my app I use a Cro::HTTP::Client to connect to remote server and make api requests via http 1.1 persistent connection. After 10-30 minutes of working, the client stops processing requests and throwing these exceptions: X::IO::Socket::Async::SSL::Verification or X::AdHoc with message Failed to resolve host name 'api.example.com' with family 0.. These errors are repeated over and over again if I try to make a request again. The requests only work again after restarting my script. In addition, the problem does not exist if I do not use persistent connections.

Proposed solution

I'm not sure if this is a Cro or a server issue (although it appears on two different servers); In any case, having the ability to close and restart the connection (something like $http-client.reset-connection would help. A new method ($http-client = Cro::HTTP::Client.new(...)) does not give the desired effect.

Note

I saved the full logs of my script with CRO_TRACE enabled. I did not analyze them because it is very difficult for me. But if it helps improve the Cro, I can find out the difference between normal responses and erroneous ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions