mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Immediate session close with a SSL filter
Date Mon, 02 Sep 2013 22:12:01 GMT
Le 9/2/13 11:34 PM, Romain Rossier a écrit :
> Hello,
>
> I have been fighting for weeks with a problem in my code with "slow or bad
> client" connections that were increasing latency for all the other clients.
> I used the writeTimeOut and check the size of the write requests for each
> sessions. If a write timeout is thrown mina tries to close the session
> immediately, if the queue is too long I close it my self.
>
> Now the session never closed right away, the sessionClosed was called 15
> min later. After spending more time i noticed than on the filterClose call
> in the SSLFilter , we try to write a last message in the queue and we add a
> listener to only continue to the next filter once that message is written.
> So when the client is already backed up like crazy and the os buffer is
> full, doing this is pretty much useless as you have to wait for the entire
> queue of backed up messages to be consumed and the session just sit there.
>
> So in that case, i would think that the right behavior would be to clear
> the queue before to try to write that last ssl close message and even have
> a timer on the message and if it can not be written in x sec, screw the
> clean ssl termination just closed the socket.

Sounds reasonnable.

Could you fill a JRA for that ?

Thanks !


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message