snoyberg/http-conduit — comment on commit b3866c25c5e1314d832474eeafb3f796827ba107
File:  line 0
By meteficha:

Given that we always take connections from the head and put connections to the tail, isn't it possible to have some stale connections on the end of the list that will just be kept open there indefinetely? I'm thinking about a server that usually needs about 3 simultaneous connections, but sometimes has a spike of 10 connections. So those extra 7 connections will be kept open with no use until the server close them. But we'll still keep them around until the next spike when we actually try to use them. Perhaps a long running server should periodically `closeManager` to clean everything? Perhaps connections could have a timestamp saying when they were last used and a function `cleanOldConnections` that closes all connections older than X minutes?

The other problem I see is that there's actually no limit on how many connections can be made to a given server, there's only a limit on how many open-but-not-being-currently-used connections. Is this a feature or a bug? =)