[Haskell-cafe] sendfile leaking descriptors on Linux?
Thomas Hartman
tphyahoo at gmail.com
Fri Feb 26 04:28:40 EST 2010
I believe this might be causing problems for me with patch-tag.
me: Like mightybyte, I run my app in a shell loop that will just
restart it after a crash. But every once in a while it won't restart
because of the busy socket and I need to do a manual restart, killing
multiple processes (usually 2).
the error I get is:
bind: resource busy (Address already in use)
This sounds like what is being discussed. I have some questions.
> the server will eventually run out of file descriptors
How can I tell if I am running out of file descriptors?
> If I use the portable build of the sendfile package, everything works fine for hours and hours of this happening.
What is the portable build and how do I use it? Do you eventually have
troubles here as well? What is the reason to use the linux native
build then? speed / more connections per second?
thanks for your help!
2010/2/4 Bardur Arantsson <spam at scientician.net>:
> Hi all,
>
> I've been using the sendfile package off Hackage, but it seems to be leaking
> file descriptors when using the Linux-native build.
>
> What's happening in my specific case is the following:
>
> 1) client requests a range of a file
> 2) server starts sending the range
> 3) client disconnects before receiving the whole file
>
> This happens over and over with the client requesting different ranges of
> the file (so the client does make progress).
>
> If I use the portable build of the sendfile package, everything works fine
> for hours and hours of this happening.
>
> If I use the Linux-native build of the sendfile package, the server
> will eventually run out of file descriptors. According to "lsof" the files
> that are being kept open are the data files being sent in 2) above.
>
> This is on GHC 6.10.x (Ubuntu).
>
> Is anyone else seeing this? Anyone got any idea what's going on?
>
> Cheers,
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list