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

IOError(EOFError() #233

Closed
quinnj opened this issue Apr 11, 2018 · 5 comments
Closed

IOError(EOFError() #233

quinnj opened this issue Apr 11, 2018 · 5 comments

Comments

@quinnj
Copy link
Member

quinnj commented Apr 11, 2018

@samoconnor, for the IOError(EOFError()) ... errors, I wonder if we could include how long the underlying connection had been idle (if applicable); this could be an easy way to detect if an idle timeout should be used (for users who run in to this problem). I'm in a situation right now where I realized I'm running in to these errors every so often, but it's not totally straightforward how to go about figuring out if this is an idle connection timeout error or not; if I had the timeout value in the error message, I could quickly scan all these types of errors in my logs and (possibly) find a pattern where requests failed most consistently w/ connections that were over 30 seconds or whatever.

@samoconnor
Copy link
Contributor

The show(io::IO, c::Connection) method displays inactive seconds if the value is > 5. However, it is probably always < 5 in the case where you get an IOError because startread has probably just be called and will have reset the timestamp.

This change: edb044c#diff-e9e66c505dad95c5784e8813441444afR3
... adds timestamps to all of the debug log messages. I hope that will help with figuring out timing related issues.

@samoconnor
Copy link
Contributor

With this change: c82979e#diff-4f12f5771d582a1c2672dbe6a4346be5R590
... time since last read is always displayed in show(::IO, ::Connection) so the ♻️ Idle log when an idle connection is reused will now show the number of seconds since the last read (46s):

julia> HTTP.get("http://httpbin.org/ip")
DEBUG: 2018-04-16T15:05:32.758 8b0b ♻️  Idle:1     1   46s httpbin.org:80:61070 16 RawFD(23)
DEBUG: 2018-04-16T15:05:32.76  8b0b 👁  Start write:T1  ⏸    1     1   46s httpbin.org:80:61070 16 RawFD(23)

@samoconnor
Copy link
Contributor

Also related, this fix JuliaLang/MbedTLS.jl#145 may make this type of EOFError much less common.

@samoconnor
Copy link
Contributor

@quinnj any further action needed here? or are the logging enhancements + #236 / JuliaLang/MbedTLS.jl#145 enough?

@quinnj quinnj closed this as completed Apr 19, 2018
@quinnj
Copy link
Member Author

quinnj commented Apr 19, 2018

Yeah, we're good. Thanks.

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

2 participants