I have a site that uses a net/http based server. I recently configured
CloudFlare in front of it. (CloudFlare is a caching CDN-esque proxy that
tends to speed up sites and protects them from common web attacks) Much to
my surprise, I found my server with over 500 established connections to
various CloudFlare servers. After some investigation it appears that
http.Server is unable to timeout idle keep-alive connections. And
apparently, CloudFlare has a bug where they also never give up on an idle
connection. Strangely, they never give up on an idle connection even after
the original client closes their side of the connection. For now, I've set
a conservative ReadTimeout which should at least close the connections
after some time. But what I really want to do is to close the connection
when I know it has been idle for a short time. Any thoughts?


Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
postedDec 20, '12 at 6:03a
activeDec 20, '12 at 12:48p

2 users in discussion

Kellegous: 1 post Minux: 1 post



site design / logo © 2022 Grokbase