Thanks Emmanuel,
please let me know what i can do about the executor. i need only that the
messages of clients are ordered
like seems they are right now with OrderedThreadPoolExecutor

thanks
F.

2011/12/11 Emmanuel Lécharny <elecha...@apache.org>

> On 12/11/11 11:28 PM, antares wrote:
>
>> In my log i receive some Session.close
>>
>
> Some ? You should have the same number of Session.close than you have
> opened sessions.
>
> You should first check one one single client to see if the session is
> correctly closed in any case.
>
> Regarding the reuseAddress flag, it's only valid for the acceptor, and
> does not impact the other sockets.
>
> I'd rather check if the executor is mandatory in your case. Using an
> executor has some side effects that you must handle, like you may have more
> than one request for a single session being executed at the same time.
>
>> also in mina.log
>>
>> Queue : [SESSION_CLOSED, ]
>> 23:25:28,963 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6753
>> 23:25:28,964 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6753
>> 23:25:33,206 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6096
>> Queue : [SESSION_CLOSED, ]
>> 23:25:33,206 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6096
>> 23:25:33,207 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6096
>> 23:25:42,985 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6760
>> Queue : [SESSION_CLOSED, ]
>> 23:25:42,985 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6760
>> 23:25:42,985 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6760
>> 23:25:43,366 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6065
>> Queue : [SESSION_CLOSED, ]
>> 23:25:43,366 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6065
>> 23:25:43,367 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6065
>> 23:25:44,711 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6763
>> Queue : [SESSION_CLOSED, ]
>> 23:25:44,711 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6763
>> 23:25:44,713 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6763
>> 23:25:47,612 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6748
>> Queue : [SESSION_CLOSED, ]
>> 23:25:47,613 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6748
>> 23:25:47,613 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6748
>> 23:25:49,338 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6649
>> Queue : [SESSION_CLOSED, ]
>> 23:25:49,338 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6649
>> 23:25:49,338 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6649
>> 23:25:49,727 DEBUG OrderedThreadPoolExecutor:443 - Adding event
>> SESSION_CLOSED to session 6466
>> Queue : [SESSION_CLOSED, ]
>> 23:25:49,727 DEBUG IoFilterEvent:69 - Firing a SESSION_CLOSED event for
>> session 6466
>> 23:25:49,728 DEBUG IoFilterEvent:118 - Event SESSION_CLOSED has been fired
>> for session 6466
>>
>>
>> root@ns222281:~/server/logs# netstat -ant | grep 9010 | grep ESTABLISHED
>> |
>> wc -l
>> 711
>>
>>
>> anyway i have 711 of estabilished connections
>>
>> i am using this way to star the nioserver:
>>
>> i am doing wrong for example using reuseAddress true ?
>>
>>         try {
>>             acceptor = new NioSocketAcceptor();
>>             acceptor.getSessionConfig().**setReuseAddress(true);
>>             acceptor.setHandler(new Connector(this.engine));
>>             acceptor.bind(new InetSocketAddress(port));
>>             DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
>>             chain.addLast("codec", new ProtocolCodecFilter(new
>> FlashCrossdomainCodec()));
>>             chain.addLast("pooler", new ExecutorFilter(new
>> OrderedThreadPoolExecutor()));
>>             chain.addLast("ipFilter", blackListFilter);
>>             log.info("[waitForClients] START SocketServer: " +
>> InetAddress.getLocalHost() + ":" + port);
>>
>>         } catch (Exception e) {
>>             e.printStackTrace();
>>             log.warn("[PokerServer] Error on starting Mina! Exception=" +
>> e.getMessage());
>>             System.exit(0);
>>         }
>>
>> 2011/12/11 Emmanuel Lecharny<elecha...@gmail.com>
>>
>>  On 12/11/11 10:44 PM, antares wrote:
>>>
>>>  Hi,
>>>> i am using mina 2.0.4 and to close connections i use session.close(true)
>>>> but with 15 player i have
>>>> over 650 connectsion ESTABILISCHED on my port 9010
>>>>
>>>> root@ns222281:~/server# netstat -ant | grep 9010 | grep ESTABLISHED |
>>>> wc
>>>> -l
>>>> 649
>>>>
>>>>
>>>> this java version
>>>>
>>>> java version "1.6.0_26"
>>>> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
>>>> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
>>>>
>>>> on this system:
>>>> Linux 2.6.38.2-grsec-xxxx-grs-ipv6-****64
>>>>
>>>>
>>>> i start the server with these commands:
>>>>
>>>> java -server -Xms512m -Xmx512m -Xss128k -XX:+AggressiveOpts
>>>> -XX:+UseParallelGC -XX:+UseBiasedLocking -XX:NewSize=64m -jar
>>>> ./obpkr.jar&
>>>>
>>>> anyone can help me ?
>>>>
>>>>  Check that your session are really closed, handling the sessionClose
>>> event. If you never receive this even, that means the session is never
>>> closed. You should also add some logs (or the log filter) to see if the
>>> session.close() is really called.
>>>
>>> It's likely to be a bug in your application...
>>>
>>>
>>> --
>>> Regards,
>>> Cordialement,
>>> Emmanuel Lécharny
>>> www.iktek.com
>>>
>>>
>>>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Reply via email to