[Haskell-cafe] HTTP package: connection closing bug?

Daniel McAllansmith dm.maillists at gmail.com
Fri Aug 22 00:15:28 EDT 2008

On Fri, 22 Aug 2008 14:15:48 Duncan Coutts wrote:
> On Thu, 2008-08-21 at 19:12 -0400, Arjun Guha wrote:
> > > Aha, I knew I wasn't dreaming!
> > >
> > > <http://mult.ifario.us/p/a-short-adventure-with-simplehttp>
> > >
> > > Paul Brown posted this discussion back in February. It looks like the
> > > same thing. Has there been an update of HTTP since then?
> >
> > Nope, it hasn't been updated.  I'm just running a locally patched
> > version.  This is the same issue, thanks!

Looks like there is a patch committed to http's darcs repo, 3rd May, from prb 
to address this problem.

> If someone could figure out the right fix and send it to the maintainer
> that'd be great. We do need a decent working pure-haskell http package.

Agreed.  I think http needs serious work before it would fit the bill though.

> For one thing cabal-install uses the HTTP package and it has to work for
> downloading dozens or hundreds of packages in a single session.
> As an aside, cabal-install could use the Network.Browser module better,
> by using a single call to browse for all downloads rather than one per
> download. As I understand it, that'd allow it to re-use a single
> connection.

It's quite likely you are leaking a connection on every call to browse.  I 
recall someone asking about how to configure hackage's Apache to handle more 
than 1000 open connections... maybe cabal-install is the reason for it 
needing so many concurrent connections.

I've sent a patch for Network.Browser.browse to Bjorn.


More information about the Haskell-Cafe mailing list