-
Notifications
You must be signed in to change notification settings - Fork 179
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
More info for debugging EOFError
s
#199
Comments
Hi @rofinn, Passing Line 93 in a48aadd
Editing Line 9 in a48aadd
Please copy/paste the debug output, the stack trace from the |
Awesome, thanks. Setting the
|
Hi @rofinn, I think I understand what is going on here.
In this case, it may be possible to figure out that the request was never really sent, so it is safe to retry it, however, it may not be generally possible. There may be an edge case where the connection failure happens after the request is sent, but the failure looks the same as this, in which case we shouldn't retry automatically per section 6.3.1. In this case, if you know at the application level that your requests are safe to retry (i.e. you won't be depositing money in the account twice by retrying), then you should either have an application-level retry loop that retries on Lines 53 to 59 in b7b8e0f
I have reproduced the behaviour you were seeing and confirmed that passing DEBUG: 4e1d 👁 Start read: T13 🔗 13↑🔒 13↓
DEBUG: 1651 🔒 POST non-idempotent, holding write lock: T13 🔗 13↑🔒 13↓
DEBUG: 4e1d ❗️ ConnectionLayer EOFError(). Closing: T13 💀 13↑🔒 13↓🔒
DEBUG: 4e1d 🗣 Write done: T13 💀 14↑ 13↓🔒
DEBUG: 4e1d ✉️ Read done: T13 💀 14↑ 14↓
DEBUG: 4e1d 🔄 Retry IOError(EOFError() during request()
DEBUG: 4e1d 🗑 Deleted: 💀 14↑ 14↓
DEBUG: 4e1d SSL connect:
DEBUG: 4e1d TCP connect:
DEBUG: 4e1d 🔗 New: ⏸ 0↑ 0↓
DEBUG: 4e1d 👁 Start write:T0 ⏸ 0↑ 0↓
➡️ "POST /Main/query HTTP/1.1\r\n" |
Also note: I've added a |
Awesome, thanks for the info @samoconnor. It would be nice if we could distinguish between the normal timing out of idle connections vs an eof condition (maybe via some kind of client side timeout setting on the connection pool?), but this should be enough to solve my issues. |
When a connection is returned to the (read) pool, add a monitor to it for receiving unexpected data (or EOF), and kill / close the Connection object if any activity occurs before the next write (when it should have simply been waiting idle in the pool) per JuliaLang/MbedTLS.jl#145 (comment) closes #214 closes #199 closes #220 closes JuliaWeb/GitHub.jl#106
* ConnectionPool: monitor idle connections When a connection is returned to the (read) pool, add a monitor to it for receiving unexpected data (or EOF), and kill / close the Connection object if any activity occurs before the next write (when it should have simply been waiting idle in the pool) per JuliaLang/MbedTLS.jl#145 (comment) closes #214 closes #199 closes #220 closes JuliaWeb/GitHub.jl#106 * - Encapsulate read|writebusy/sequence/count logic in new isbusy function. - Move close() on eof() || !isbusy() to new monitor_idle_connection function. - Make monitor_idle_connection() a noop for ::Connection{SSLContext} * require Julia 0.6.3 #236 (comment)
I keep hitting random
EOFError
s while running anHTTP.post
request against a server. Is there a way to get HTTP.jl to print out whatever it found prior to getting theEOFError
?The text was updated successfully, but these errors were encountered: