blocking when sending lots of data

mra mra at xoba.com
Mon Jul 6 08:37:11 EDT 2009


in my system i often want to send out LOTS of data in a burst, maybe 100's or
1000's of packets (google protobufs) of about 1,000,000 bytes each. now i
know in a typical use of OIO, writing to Socket.getOutputStream(), the O/S
will block if TCP and its buffers can't immediately absorb the data. but
with netty, i'm worried that an unlimited number of bytes could wind up
absorbed into the JVM even if the underlying TCP blocks, leading to
OutOfMemory exceptions? i think i may have observed this in practice with
netty (but i'm not 100% sure that's the root cause), and so i'm wondering if
i should throttle  output manually instead.
-- 
View this message in context: http://n2.nabble.com/blocking-when-sending-lots-of-data-tp3212806p3212806.html
Sent from the Netty User Group mailing list archive at Nabble.com.



More information about the netty-users mailing list