Maximum TCP Socket Connections


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Maximum TCP Socket Connections

Hybrid View

  1. #1
    Tom Guest

    Maximum TCP Socket Connections


    Is there some kind of maximum TCP connection setting in Java? I have a server
    application that accepts incoming TCP socket connections. I set up a very
    large pool of threads that listen for connection requests. These objects
    do just fine until I exceed 640 simultaneous connections. At this point
    I get an exception on "serverSocket.accept();" The error returned is "Too
    many open files". I seem to have plenty of memory. I've adjusted the heap
    settings to much higher values than I feel I need but nothing seems to improve
    on this 640 limit.

    I'm running this on Redhat Linux 7.2 with JDK 1.3.1_02.

    Even if you're not sure what the problem is, please respond with any suggestions
    you may have. This problem is a serious show-stopper for my project right
    now.

    Thanks in advance,

    -Tom

  2. #2
    Ruchi Dhar Guest

    Re: Maximum TCP Socket Connections


    The linux kernel imposes a limit (of 1024) on the number of file
    descriptors per process. Of course tcp/ip sockets also appear as files
    and require file descriptors.

    You need to recompile your kernel and change some environment settings.

    Check out http://www.jlinux.org/server.html for a description of the
    problem and how to fix it.



    "Tom" <tom.heagy@sciatl.com> wrote:
    >
    >Is there some kind of maximum TCP connection setting in Java? I have a

    server
    >application that accepts incoming TCP socket connections. I set up a very
    >large pool of threads that listen for connection requests. These objects
    >do just fine until I exceed 640 simultaneous connections. At this point
    >I get an exception on "serverSocket.accept();" The error returned is "Too
    >many open files". I seem to have plenty of memory. I've adjusted the heap
    >settings to much higher values than I feel I need but nothing seems to improve
    >on this 640 limit.
    >
    >I'm running this on Redhat Linux 7.2 with JDK 1.3.1_02.
    >
    >Even if you're not sure what the problem is, please respond with any suggestions
    >you may have. This problem is a serious show-stopper for my project right
    >now.
    >
    >Thanks in advance,
    >
    >-Tom



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center