Skip to content

net/http: tls handshake EOF on new connections when passing connection between goroutines #10685

Closed
@bbangert

Description

@bbangert

When using SSL and websockets (using either gorilla or golang.org's websocket lib), moderate connection load will result in clients not connecting properly, and this message:

2015/05/04 13:31:58 http: TLS handshake error from 127.0.0.1:5253: EOF
2015/05/04 13:31:58 http: TLS handshake error from 127.0.0.1:5254: EOF
2015/05/04 13:31:58 http: TLS handshake error from 127.0.0.1:5255: EOF
2015/05/04 13:31:58 http: TLS handshake error from 127.0.0.1:5256: EOF
2015/05/04 13:31:58 http: TLS handshake error from 127.0.0.1:5257: EOF

This doesn't happen in my basic example (located here: https://github.com/bbangert/ssl-ram-testing/blob/master/Go/golang.org/main.go) when it uses io.Copy to implement the echo server, but when it merely uses another goroutine to write the echo'd data back then the TLS handshake errors pop up.

I observed this using the latest Go 1.4.2, we have observed it in prior versions of Go in production, but this is the first time I have a minimal example of it (for testing SSL RAM overhead per connection, which is very very high in Golang, but that's a separate issue....).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions