Hi!
Are you doing anything else than plain text decoding? Maybe there's a leak 
somewhere at your code, or maybe it takes too long to execute your code, so the 
received message pile up while your code is executed.
To prevent the latter one, you can use an ExecutorFilter (put behind the 
Decoder) to separate the long running operations from the receiver/decoder and 
get a better scalability.
If nothing helps: Try a profiler!

hth

Steve

> -----Ursprüngliche Nachricht-----
> Von: Maziyar Eslamieh [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 12. Juni 2008 18:16
> An: Forum MINA
> Betreff: problem:outof memory error
>
> Hi all
> Can you help me?
> I am using MINA2 in my messaging system.
> This system is a server that send and receive text message.
> I use this filter in my server:
>    acceptor.getFilterChain().addLast(
>                 "codec",
>                 new ProtocolCodecFilter(new
> TextLineCodecFactory(Charset
>                         .forName("UTF-8"))));
>
> I have two scenario:
> 1) this server send 500 msg per second and client replay to this
> 2) this server receive  500 msg per second from client and replay to
> client
>
> as result server send and receive 2000 msg/sec .
> After one day system throw outofmemory exception and server is down.
> my heap size is 2Gige.
>
> what is your solution to this problem?
> Do you check my source If i send this to forum ?
>
>
>

Reply via email to