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

A method to reset connection #189

Open
fingolfin0 opened this issue Nov 17, 2023 · 0 comments
Open

A method to reset connection #189

fingolfin0 opened this issue Nov 17, 2023 · 0 comments

Comments

@fingolfin0
Copy link

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.

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

1 participant