Closed
Description
The symptom is that requests occasionally fail with io.EOF. I've observed this when making requests against AWS's ELB (Elastic Load Balancer), but it might happen elsewhere. When ELB's load suddenly increases, it can respond with HTTP 503 errors while it warms up. When it does this over HTTPS, it also sends a TLS close_notify alert but does not close the connection itself. Go's http package receives ELB's 503 responses just fine. However, it does not read the close_notify alert and so doesn't realize that the TLS connection is effectively closed. It then tries to reuse the same connection for its next request. The next request's writes all succeed, but ELB is completely ignoring everything. Then http attempts to read the response, the tls.Conn sees the close_notify alert from the previous response, and the read returns io.EOF. I can provide steps to reproduce the problem, but unfortunately they're kind of involved. 1. Sign up for an account on http://www.iron.io/ 2. Create a project and take note of its project ID. 3. Get an API token from https://hud.iron.io/tokens 4. Run the attached program until it panics
Attachments:
- mq_eof.go (499 bytes)