OutOfMemory in HttpClient
Wesly smith
weslysmith0 at gmail.com
Fri Jan 16 14:52:29 EST 2009
Gee... you asked a very similar question like mine.
In my case, I set the NIO selector loop number too high, such as 160 below,
and I sent in 1M content size message from client, and it caused
out-of-message on my setup.
ChannelFactory factory =
new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool(), 160);
But after I switch the default numbers (usually, the jvm pick up the core
numbers if you don't specify it), and I didn't see the out-of-memory problem
after I punched 100000 messages with each client message having
ChannelBuffer 1024x1024 bytes.
jaimemm wrote:
>
> Taking the HTTP Client server example and including into a loop, to send N
> messages, the connection & send message logic, the memory consumption
> raises over 500mb for just 700 messages (10Kb each) which causes the
> OutOfMemoryException. Am I doing something wrong? is there any piece of
> code susceptible of memory leaking? What should I check?
>
> thanks
>
--
View this message in context: http://n2.nabble.com/OutOfMemory-in-HttpClient-tp2170142p2170283.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list