Re: [Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-02-07 Thread Alexander Kjeldaas
On 30 January 2012 14:22, Rob Stewart wrote: > Hi, > > I'm experiencing the "accept: resource exhausted (Too many open > files)" exception when trying to use sockets in my Haskell program. > > The situation: > - Around a dozen Linux machines running my Haskell program, > transmitting thousands of

Re: [Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-02-03 Thread Matthew Farkas-Dyck
Rob Stewart wrote: > transmitting thousands of messages to each other, sometimes within a small > period of time. Either SCTP or UDP seems far more appropriate than TCP (which I assume, hopefully safely, to be at work here) for this task. ___ Haskell-C

Re: [Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-01-30 Thread Marc Weber
What you can try - reduce amount of threads running at the same time - thus accept less connections. AFAIK the OS has a buffer caching the connection request for a while - thus this may just work. Using STM it would be trivial to implement it: try incrementing a var, if it is > 100 fail. I

[Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-01-30 Thread Rob Stewart
Hi, I'm experiencing the "accept: resource exhausted (Too many open files)" exception when trying to use sockets in my Haskell program. The situation: - Around a dozen Linux machines running my Haskell program, transmitting thousands of messages to each other, sometimes within a small period of t