[Mono-bugs] [Bug 430040] New: TcpClient breaks after 1000 consecutive connections

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 25 17:26:23 EDT 2008


           Summary: TcpClient breaks after 1000 consecutive connections
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: i686
        OS/Version: SLES 10
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: webservices at landmarkdigital.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development

We have a class that we have been using for some time which communicates with a
remote server via the class System.Net.Sockets.TcpClient.  We have had code
deployed which uses this class for some time, and have verified that it
functions correctly under mono 1.9.1.  However, when we recently performed a
load test on our services running on mono 2.0, we discovered that after 1000
connections have been established and disposed, the TcpClient constructor
throws an exception:

System.Net.Sockets.SocketException: Too many open files
  at System.Net.Sockets.Socket..ctor (AddressFamily family, SocketType type,
ProtocolType proto) [0x00000]
  at System.Net.Sockets.TcpClient.Init (AddressFamily family) [0x00000]
  at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses,
Int32 port) [0x00000]
  at System.Net.Sockets.TcpClient.Connect (System.String hostname, Int32 port)
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, Int32 port)

This error occurs within the context of web service (apache/mod_mono)
execution, and appears to be an issue with the TcpClient class. To reiterate,
this code has been verified to work in mono 1.9.1.  on the same operating
system.  I do not have example code to give right now, but can hopefully post
some soon.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list