From: Joel VanderWerf Date: 2010-07-01T06:03:02+09:00 Subject: Re: Networking: select() blocks for seconds (> timeout) Roger Pack wrote: >>> Try your code with >>> BasicSocket.do_not_reverse_lookup=true >> Three observations: >> >> a) I do not think that there can be a DNS lookup between a 'select(x, y, >> z)' and a 'socket.recvfrom'. > > It might, see > http://www.ensta.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/socket/rdoc/classes/Socket.html#M001258 > > Why don't you try it and find out? Seconded: it's worth a try. Also, if you really believe this is GC-related, you can prove it by GC.disable before the select, GC.enable after the recvfrom. It seems highly unlikely that GC would be eating up 10 seconds.