select(2) can't monitor fds with number >1024. This is troublesome for
network servers with many connections. After reconnects MongoDB's fd has
number >1024 and select returns with error.
Replace select(2) with poll(2) to monitor file descriptors.
This would be great, but it looks like Windows uses WSAPoll instead of poll(). So, I'm going to wait on merging it until I have time to implement the Windows version alongside the posix one (or if you have a Windows machine handy and want to help further...).
Ops... windowzzz... I'll try to fix this...
try to use WSAPoll on Win32 (warning: minimum windows versions "Windo…
…ws Vista" and "Windows Server 2008")
strerror not implemented on WIN32. MSDN suggests to use FormatMessage…
…, but I can not test it, so simple print "-" instead of readable message
I only have WinXP. And no MSVC. So I can't test.
I'll merge as soon as I get a chance to test on Windows...
Closing this as our networking code is undergoing an overhaul very soon. Sorry to keep you wiring @vovkasm
No problems. We worked with locally patched version of module about 3-4 months, but at the end we realized that MongoDB big crap at all (for our workload). After that we switched to mysql with simple MyISAM table that maps object ids to serialized data and now we a happy with this scheme. ;-)