Home Bug Reports

unknown exception in `Ice.ThreadPool.Server'

aroanaroan Member
I have a distributed application which is tested on my developer computer. This means that more that 60 clients runs and tries to call the same server (DLocalCommServer) almost at the same time (I think this causes this error),
because if there are less clients, this never happens.


I use .NET Framework 1.1, C#, ICECS, on a Windows XP Prof. The DLocalCommServer uses a config file with the settings:

LocalCommAdapter.Endpoints=tcp -p 11998
Ice.ThreadPool.Server.Size=50
Ice.ThreadPool.Server.SizeWarn=50
Ice.ThreadPool.Server.SizeMax=100

DLocalCommServer.exe: error: unknown exception in `Ice.ThreadPool.Server' thread DLocalCommServer.exe-Ice.ThreadPool.Server-8:
System.IndexOutOfRangeException: Az index a tömb határain kívülre mutatott. at System.Net.Sockets.Socket.SocketListToFileDescriptorSet(IList socketList) at System.Net.Sockets.Socket.Select(IList checkRead, IList checkWrite, IList checkError, Int32 microSeconds)
at IceInternal.Network.doSelect(IList checkRead, IList checkWrite, IList checkError, Int32 milliSeconds)
at IceInternal.ThreadPool.run(BasicStream stream)
at IceInternal.EventHandlerThread.Run()

Az index a tömb határain kívülre mutatott. = "The index was outside of the array"

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Before we can help you, can you please update your signature as described in this post.

    Thanks,

    Michi.
  • aroanaroan Member
    >And unknown exception is a non-Ice exception.

    >In your server code, can you add a catch(...) to see if any unexpected >exceptions are raised?
    I have already added to all the server functions a try...catch blokk, and still have this exception...
  • beaglesbeagles Member Brent EaglesOrganization: Eagles Technologies IncProject: Asterisk SCF ✭✭✭
    System.IndexOutOfRangeException: Az index a tömb határain kívülre
    mutatott. at System.Net.Sockets.Socket.SocketListToFileDescript
    orSet(IList socketList) at
    I was able to reproduce this exception by running several instances (somewhere around 56) of a slightly modified hello world demo. I did a quick search and found a few reports of problems with the Socket.Select call with ILists of more than 64 elements. I wasn't aware of any limitations on the .NET framework's Socket.Select call and could not find anything definitive in the docs. It may be that Socket.Select is internally limited by Winsock's default FD_SETSIZE of 64. Unfortunately, while I was able to find articles and postings that described the problem I didn't see any responses confirming the limitation or describing any workarounds.

    It may be of some relevance that Mono is built with FD_SETSIZE defined as 1024 and I've been able to run 100 concurrent simultaneously active clients (pinging every 5 seconds) against the hello world server running under Mono for Windows. Please note that 100 clients isn't the limit with Mono, I simply didn't try it with more.

    I'll confer with my colleagues to see if there is a workaround. If you are using Ice 3.0.0 or greater, you *could* use thread per connection but that certainly isn't a great solution if you have a large number of connections.
  • aroanaroan Member
    Thank you for your answer. This case I stop finding bugs in my app, and wait for the workaround... thanks again.
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Unfortunately, you are running in the limit of 64 file descriptors (FD_SETSIZE) of the platform SDK. .NET 1.1 inherits that limit, and there is no work-around.

    The next major release of Ice will support .NET 2.0, which doesn't suffer from this limitation.

    Cheers,

    Michi.
Sign In or Register to comment.