direct buffer memory issues

Adam Fisk a at littleshoot.org
Mon Mar 8 13:24:43 EST 2010


That's a great point, Stephen. I've been much more concerned up until
now with the correctness and functionality of the proxy than with
optimizing its use of Netty, so the NioClientSocketChannelFactory per
client was more a function of simply getting everything up and running
quickly.

Trustin can undoubtedly answer this better. Would it make more sense
for me to use a single NioClientSocketChannelFactory across all
connections? I'm assuming so, which also makes the task of cleaning
them up much easier (using Stephen's shutdown hook approach).

Thanks guys.

-Adam


On Mon, Mar 8, 2010 at 9:25 AM, Stephen Haberman
<stephen at exigencecorp.com> wrote:
> Hi Adam,
>
>> I wasn't calling releaseExternalResources in all cases.
>
> For my own education, am I right that this means LittleProxy has
> multiple NioClientSocketChannelFactorys? Perhaps one per proxy client?
>
> This is not that big of a deal given the little to no traffic my
> fakehttp proxy has to deal with, but I currently have it creating just
> one NioClientSocketChannelFactory on startup and then having all client
> connections come from that one single factory.
>
> It turns out I was not calling releaseExternalResources at all, on
> either the server or client nio factories, but adding the call for both
> was just two lines in my shutdown hook Runnable given I have only a
> single instance of both.
>
> Is there a good reason to have multiple NioClientSocketChannelFactorys,
> or am I just misreading your post?
>
> Thanks,
> Stephen
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



-- 
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk


More information about the netty-users mailing list