#StackBounty: #ruby #sockets #memcached Why would socket.write hang indefinitely?

Bounty: 50

What would make a write call to a TCPSocket hang indefinitely?

lotsOfBytes = # a really large number of bytes, like 1 or 2 MB of data

socket = TCPSocket.new # some config
socket.write(lotsOfBytes) # this line hangs

I am trying to debug an issue where a get_multi operation sent to memcached with a large number of keys hangs indefinitely, and it does so on a line that resembles that code snippet. I’m trying to better understand how the low-level sockets on which this library is built are expected to work.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.