mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: Help! Datagram Acceptor Problem.
Date Tue, 05 Jun 2007 08:02:09 GMT
Hello Murat,

On 6/5/07, Murat OZDEMiR <mozdemir79@gmail.com> wrote:
> Dear friends,
>
> I've almost memorized all tutorials about UDP and looked at Nabble forums if
> someone have had similar problem as me. I've tried everything last 3 days
> and finally have chosen Single Thread model for both DatagramAcceptor and
> ExecuterFilter which is now working good enough. But i don't prefer to use
> Single Thread as well.
>
> Let me explain what does my application on MINA do. Thousands of clients
> send UDP packets to the server from the area. Some TCP clients are also
> exist. After packet received, my message handler saves the message to the
> database and constructs ACK message and writes the message into the session.
> My problem is; server cannot send ACK packets to the clients in required
> time-out. So clients send last packet again. The problem is not about having
> possible delay to insert the incoming messages into database, the problem is
> sending the packet after writing into the session.

Thank you for posting your source code.  I couldn't find a particular
problem there.  Due to the characteristic of the problem, I'd like to
suggest you to try the following things:

1) Provide us the full thread dump when the server is having a problem.
2) Modify DatagramAcceptorDelegate (in
org.apache.mina.transport.socket.nio.support).
2a) Change selector.select() to selector.select(1000); (this will
check if the selector is waken up correctly)
2b) Print out some debug messages in
DatagramAcceptorDelegate.flush(DatagramSessionImpl) and around
selector.select().
3) Provide us minimal client/server implementation that reproduces the problem.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Mime
View raw message