4 ms·
Similar unrelated problem here, too, on the sole machine now running the Heartbleed test. After recompiling with Go 1.4 (from Go 1.2 - apparently the network p
by FiloSottile 12y ago
Similar unrelated problem here, too, on the sole machine now running the Heartbleed test.
After recompiling with Go 1.4 (from Go 1.2 - apparently the network poller was rewritten?) I'd start running out of file descriptors really fast, all leaking deep in net/http.ReadRequest.
Turns out http.DefaultServer doesn't have any default ReadTimeout, so when a client goes away before finishing a request I'd lose the goroutine and the file descriptor with it.
So yeah, you probably also want to explicitly set http.Server.ReadTimeout if you are not doing weird streaming/"comet" stuff.
- tptacek 12y agoThat's related to my problem, but not the same; what I needed was control over when an fd/goroutine would be destroyed. Explicit timeouts (at least in 1.0, but I think still) couldn't give me that. I needed an obscene number of fds, though.