I absolutely understand how you must write the entire message at once to ensure that another message from another thread doesn't cause the stream to be corrupted. That said, I also think this is an SSHD issue and not a Mina one.
On Thu, Aug 31, 2017 at 2:50 AM Emmanuel Lecharny (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/DIRMINA-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148533#comment-16148533 > ] > > Emmanuel Lecharny commented on DIRMINA-1070: > -------------------------------------------- > > At this point, I think it would be a good idea to move this ticket to > SSHD, for our fellow sshd dev to gie you a better answer! > > > Avoid unbounded message queueing when sending large amounts of data to > slow clients > > > ----------------------------------------------------------------------------------- > > > > Key: DIRMINA-1070 > > URL: https://issues.apache.org/jira/browse/DIRMINA-1070 > > Project: MINA > > Issue Type: New Feature > > Components: Core > > Reporter: jpalacios > > Labels: stability > > > > Our application runs an Apache MINA server to provide SSH support. We > are seeing {{OutOfMemoryError}} s when certain clients establish a session > with a large {{Window}} size. Particularly clients like TortoiseGit (which > uses TortoisePlink which in turn seems to use Putty) use an initial window > size of 2GB. From heap dumps we can see that the > {{DefaultWriteRequestQueue}} is filling up with {{WriteRequest}} instances > and taking up gigabytes of space until the heap blows. > > > > -- > This message was sent by Atlassian JIRA > (v6.4.14#64029) >
