[ 
https://issues.apache.org/jira/browse/HTTPCORE-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848306#comment-13848306
 ] 

Oleg Kalnichevski commented on HTTPCORE-368:
--------------------------------------------

Let me start off by questioning the wisdom of keeping 30k+ concurrent outgoing 
connections that I presume are mostly idle, hence the problem with the buffers 
allocated by those connections. 

Anyway this is what I see as a possible solution to the problem: introduce a 
strategy interface injectable at the construction time of SSLIOSession and 
provide several implementations of it: one basic based on immutable buffers and 
another one being being capable of deallocation of buffers that appear unused. 
This would also open a possibility of creating a more sophisticated strategy 
based on buffer pools.

Oleg

> Smarter use of buffers in SSLIOSession
> --------------------------------------
>
>                 Key: HTTPCORE-368
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-368
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.3-beta2
>            Reporter: offbynull
>              Labels: patch
>         Attachments: SSLIOSession.patch
>
>
> We're using the async client to load test our comet infrastructure. We're 
> frequently running in to OutOfMemoryErrors due to the ByteBuffers allocated 
> in SSLIOSession.
> The following is a quick-and-dirty patch to SSLIOSession that removes the 
> buffers when they aren't needed. Could we get this (or something similar to 
> this) added in to httpcore-nio?



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to