#490 Reactor / Observer bug when scaling

Net (141)

Dear Poco maintainers,

I have been testing SocketReactor scalability and have come across some interesting behavior running on a windows XP machine.
When simultaneously connecting multiple clients (issue occurs after ~60) the ServiceHandler simply stops receiving callbacks.
I have tracked the issue all the way to the Observer callback method:
which is not calling the appropriate class method ie. void onReadable(ReadableNotification
The same thing happens when I attempt to call a direct method on the ServiceHandler from the observer.

Note that the reactor is running in a separate thread, and I am using the test EchoServiceHandler so no thread locking is used. This is not a deadlock situation.

In the mean time I have implemented my own reactor which used async callbacks using my own callback code and no such problems arise. Note that async callbacks also significantly improve the reactor performance, is that something that might be considered for Poco?

I have never experienced such behavior, but no doubt you are much more experienced programmers than I. Perhaps you can explain / fix it?


  • Yuki Izayoi
    Yuki Izayoi

    I think the reason of your bug is the windows xp select io model only support max 64 sockets.Poco need to provide some scalable asio solution for windows such as proactor.
    For Linux,Poco 's reactor use epoll to emulate the select and the performance is not good because of recreate epoll handle and insert sockets every time when you call the select function.

  • James Mansion
    James Mansion

    That is not true - the default value for FD_SETSIZE is 64. You can change it - read the documentation on select.

  • Here's the Microsoft statement on that issue: http://support.microsoft.com/kb/111855.
    Closing this because it's not really a bug and there's also a feature request regarding this.