Archived

This forum has been archived. Please start a new discussion on GitHub.

IceUtil::ThreadSyscallException

hi,

I got a problem.
When I'm trying to create about the 150th (maybe more)connection to the server, it gave me this exception, and tell me that OutOfMemory, I really don't know why and how to make it work.

I do destroy the communicator() of the client, and delete the instance of the ClientSideI class for closing every connection, is it right?

Any help is appreciated.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Which Ice version do you use and on which platform? Can you copy/paste the exception message?

    Cheers,
    Benoit
  • Hi,

    I'm using Ice 3.3.1 for Windows, because the exception message is showed in Chinese, so I think in English it should be like this:

    Thread.cpp:206: IceUtil::ThreadSyscallExcepiton:
    syscall exception: not enough storage space, can not process this command.

    this showed when I'm trying the create the Server Proxy.

    Sorry for the translation.
  • benoit
    benoit Rennes, France
    Hi,

    It sounds like you have a memory leak. Is it the client or the server which is throwing this exception? We would need a little more info to help you figuring out where the leak can come from. Could you perhaps post a sample test case which demonstrates the problem or post the relevant client or server code?

    Cheers,
    Benoit.
  • Sorry, for some reason, I can't paste the code here.

    The client is throwing this exception.

    By the way, is there any suggestion for closing the connection safely?

    Thanks
  • benoit
    benoit Rennes, France
    Hi,

    You can attach a zip file or text files to a new post using the "Attach Files" section.

    You shouldn't need to close connections explicitly: connections are closed automatically by Ice active connection management (ACM, see here for more information) if idle.

    If I understand it correctly, your client create/destroy multiple times the Ice communicator. Why not just create a single communicator? How do you destroy the communicator? Are you sure that all references to the destroyed communicator are correctly released? If you create many communicators but don't properly release references to these communicators, it's likely the problem. The simplest is is to create a single communicator for the entire lifetime of the application.

    Cheers,
    Benoit.
  • Hi,

    Yes, I've created so many communicators for each connection, because I thought every connection need a separate communicator, I try to release the communicator after the connection closed, it works fine.

    Thanks very much! Have a good day.
  • Another question.

    If I want to make concurrent connections from the client to the server, is this *only one* communicator enough to work?