You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Jakub Turcovsky <tu...@master.cz> on 2015/01/28 14:56:10 UTC

UDP server closes active session after 60s

Hello developers,

I've implemented a client-server app using MINAv2.0.9 on both sides. 
When communicating over UDP, server closes active session after 60s 
(probably DEFAULT_TIME_TO_LIVE interval in ExpiringMap class). It looks 
like server doesn't update time-to-live of the session with every 
message sent. More about my problem at 
http://stackoverflow.com/questions/28187401/apache-mina-server-closes-active-udp-session-after-60s.

Should I somehow explicitly tell MINA to update time-to-live with every 
message received? Or where should i search for the problem?

Best regards
JT

Re: UDP server closes active session after 60s

Posted by Jakub Turcovsky <tu...@master.cz>.
Hi, I've filled it. Thanks for your reply!

https://issues.apache.org/jira/browse/DIRMINA-1003

Regards
JT

On 28.1.2015 15:20, Emmanuel Lécharny wrote:
> Le 28/01/15 15:15, Emmanuel Lécharny a écrit :
>> Le 28/01/15 14:56, Jakub Turcovsky a écrit :
>>> Hello developers,
>>>
>>> I've implemented a client-server app using MINAv2.0.9 on both sides.
>>> When communicating over UDP, server closes active session after 60s
>>> (probably DEFAULT_TIME_TO_LIVE interval in ExpiringMap class). It
>>> looks like server doesn't update time-to-live of the session with
>>> every message sent. More about my problem at
>>> http://stackoverflow.com/questions/28187401/apache-mina-server-closes-active-udp-session-after-60s.
>> You can define your own SessinRecycler in the NioDatagram instance :
>>
>>      setSessionRecycler( IoSessionExpirer )
>>
>> Just pass it an instance that set the TimeToLive you wnat :
>>
>>      public ExpiringSessionRecycler(int timeToLive) {
>>          this(timeToLive, ExpiringMap.DEFAULT_EXPIRATION_INTERVAL);
>>      }
>>
>>
> Now, that would be just a workaround. I think there is something fishy
> in the way teh session recylcer works...
>
> Can you fill a JIRA ?
>
> Thanks !


Re: UDP server closes active session after 60s

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 28/01/15 15:15, Emmanuel Lécharny a écrit :
> Le 28/01/15 14:56, Jakub Turcovsky a écrit :
>> Hello developers,
>>
>> I've implemented a client-server app using MINAv2.0.9 on both sides.
>> When communicating over UDP, server closes active session after 60s
>> (probably DEFAULT_TIME_TO_LIVE interval in ExpiringMap class). It
>> looks like server doesn't update time-to-live of the session with
>> every message sent. More about my problem at
>> http://stackoverflow.com/questions/28187401/apache-mina-server-closes-active-udp-session-after-60s.
> You can define your own SessinRecycler in the NioDatagram instance :
>
>     setSessionRecycler( IoSessionExpirer )
>
> Just pass it an instance that set the TimeToLive you wnat :
>
>     public ExpiringSessionRecycler(int timeToLive) {
>         this(timeToLive, ExpiringMap.DEFAULT_EXPIRATION_INTERVAL);
>     }
>
>
Now, that would be just a workaround. I think there is something fishy
in the way teh session recylcer works...

Can you fill a JIRA ?

Thanks !

Re: UDP server closes active session after 60s

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 28/01/15 14:56, Jakub Turcovsky a écrit :
> Hello developers,
>
> I've implemented a client-server app using MINAv2.0.9 on both sides.
> When communicating over UDP, server closes active session after 60s
> (probably DEFAULT_TIME_TO_LIVE interval in ExpiringMap class). It
> looks like server doesn't update time-to-live of the session with
> every message sent. More about my problem at
> http://stackoverflow.com/questions/28187401/apache-mina-server-closes-active-udp-session-after-60s.

You can define your own SessinRecycler in the NioDatagram instance :

    setSessionRecycler( IoSessionExpirer )

Just pass it an instance that set the TimeToLive you wnat :

    public ExpiringSessionRecycler(int timeToLive) {
        this(timeToLive, ExpiringMap.DEFAULT_EXPIRATION_INTERVAL);
    }