Home Bug Reports

Creating many adapters in WindowsXP (Ice 3.3.0)

mcastromcastro Member Manuel CastroOrganization: IndisysProject: Natural Language Processing
Hi,

We have a problem trying to create several adapters in a C++ software using Windows XP (invoking createObjectAdapterWithEndpoints several times, with diferent parameters). Creating more than 150 adapters, we catch an Ice::SocketException, which shows that we can't use more sockets. This problem didn't happen with older versions of Ice (3.2.1 and before), apparently starting with Ice 3.3.0 version.

Same code using Ice 3.3.0 in Ubuntu 8.04 works perfectly.

We have read about FD_SETSIZE and tried to redefine it without success. Could you help us please?

Thanks in advance.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Manuel,

    Welcome to the forum!

    I'm pretty sure this is related to the "backlog" value that Ice uses for server sockets. In Ice 3.2.1 and earlier, we always used a value of 5 for this setting. We made the backlog configurable in Ice 3.3.0, with the default value using SOMAXCONN (if defined) or 511 otherwise. SOMAXCONN is defined on Windows, but it's not easy to discover exactly what value Windows uses in this case.

    I was able to reproduce the issue you described on Windows XP, but not on Windows 7.

    You can try running your server with Ice.TCP.Backlog=5 to see if it resolves the problem. Note that if many clients connect simultaneously to the same adapter, your clients might experience rejected connections if the backlog is set too low.

    Lastly, I have to ask: Is it really necessary to create so many object adapters? :)

    Best regards,
    Mark
Sign In or Register to comment.