Skip to content

Replace select(2) with poll(2) for connection management. #34

Closed
wants to merge 3 commits into from

3 participants

@vovkasm
vovkasm commented Jun 19, 2012

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.

@vovkasm vovkasm Replace select(2) with poll(2) to monitor file descriptors.
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.
53320ec
@kchodorow

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...).

@vovkasm
vovkasm commented Jun 20, 2012

Ops... windowzzz... I'll try to fix this...

vovkasm added some commits Jul 9, 2012
@vovkasm vovkasm try to use WSAPoll on Win32 (warning: minimum windows versions "Windo…
…ws Vista" and "Windows Server 2008")
5b695f2
@vovkasm vovkasm strerror not implemented on WIN32. MSDN suggests to use FormatMessage…
…, but I can not test it, so simple print "-" instead of readable message
0939aa3
@vovkasm
vovkasm commented Jul 8, 2012

Please test!
I only have WinXP. And no MSVC. So I can't test.

@kchodorow

I'll merge as soon as I get a chance to test on Windows...

@edaniels
mongodb member

Closing this as our networking code is undergoing an overhaul very soon. Sorry to keep you wiring @vovkasm

@edaniels edaniels closed this Jul 23, 2014
@vovkasm
vovkasm commented Jul 23, 2014

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. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.