Results 1 to 4 of 4

Thread: cannot create more threads.

  1. #1
    dragonii is offline Registered User
    Name: rains wang
    Organization: system design
    Project: Server Manager
    Join Date
    Sep 2009
    Posts
    14

    cannot create more threads.

    Hi

    In the program, I want to run 200 threads concurrently, but in the client side, after create about 50 threads, it cannot create more, and print out the following messages:
    Code:
    08/19/10 07:07:41.202 ./ThreadClient: error: fatal error: can't accept more connections:
    Network.cpp:1273: Ice::SocketException:
    socket exception: Too many open files
    0.0.0.0:33079
    Aborted
    I don't have any file operations in the program.

    I'm using CentOS 4.8
    Ice 3.3.1

    Before running the Client, I set
    Code:
    ulimit -s 4096
    Now I really don't know how to handle this problem, thanks for giving any help
    Last edited by dragonii; 08-19-2010 at 03:38 AM.
    enjoy linux

  2. #2
    ntsjun is offline Registered User
    Name: Jun Su
    Organization: self employed
    Project: webapp written in java invoke .net program
    Join Date
    Aug 2010
    Posts
    5
    Did you open too many files or net connection ? Check your code carefully, it seems some opend file or connection does't be closed.

  3. #3
    dragonii is offline Registered User
    Name: rains wang
    Organization: system design
    Project: Server Manager
    Join Date
    Sep 2009
    Posts
    14
    Quote Originally Posted by ntsjun View Post
    Did you open too many files or net connection ? Check your code carefully, it seems some opend file or connection does't be closed.
    No file operations in my code, and only one connection in one thread.


    Thanks
    enjoy linux

  4. #4
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Rains,

    I don't really understand what you're doing. And you should upgrade to Ice 3.4!

    Quote Originally Posted by dragonii View Post
    Hi

    In the program, I want to run 200 threads concurrently, but in the client side, after create about 50 threads, it cannot create more, and print out the following messages:
    Code:
    08/19/10 07:07:41.202 ./ThreadClient: error: fatal error: can't accept more connections:
    Network.cpp:1273: Ice::SocketException:
    socket exception: Too many open files
    0.0.0.0:33079
    Aborted
    Is your ThreadClient really a server that creates lots of object adapters (one per thread??) Doesn't sound right.

    Before running the Client, I set
    Code:
    ulimit -s 4096
    ulimit -s sets the stack size. How is this relevant here? ulimit -n and ulimit -u would be more interesting here.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 07-15-2008, 12:00 AM
  2. Threads Java: problems
    By JAX82 in forum Help Center
    Replies: 2
    Last Post: 04-20-2007, 03:40 AM
  3. Create C# threads as background threads?
    By bpolivka in forum Help Center
    Replies: 19
    Last Post: 01-31-2007, 05:36 PM
  4. Threads and Shutdown
    By acbell in forum Help Center
    Replies: 1
    Last Post: 11-30-2006, 05:16 AM
  5. Contexts and threads
    By aaron in forum Help Center
    Replies: 2
    Last Post: 01-27-2004, 12:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •