Return-Path: Delivered-To: apmail-mina-users-archive@www.apache.org Received: (qmail 37965 invoked from network); 12 Apr 2011 10:10:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 10:10:24 -0000 Received: (qmail 48525 invoked by uid 500); 12 Apr 2011 10:10:23 -0000 Delivered-To: apmail-mina-users-archive@mina.apache.org Received: (qmail 48405 invoked by uid 500); 12 Apr 2011 10:10:18 -0000 Mailing-List: contact users-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@mina.apache.org Delivered-To: mailing list users@mina.apache.org Received: (qmail 48397 invoked by uid 99); 12 Apr 2011 10:10:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 10:10:18 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 10:10:13 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q9aXg-0004Yt-U2 for users@mina.apache.org; Tue, 12 Apr 2011 03:09:52 -0700 Message-ID: <31377781.post@talk.nabble.com> Date: Tue, 12 Apr 2011 03:09:52 -0700 (PDT) From: "Sam.Park" To: users@mina.apache.org Subject: Re: I Wonder Why client connection timeout occurs while the MINA server broadcasts message to connected users. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: android@eumsol.com References: <31375147.post@talk.nabble.com> Hi=20 I am now aware how I/O processor thread working on MINA framework. It seems like I/O processor thread=20 in threadpool processing new connection event. But I am not sure how exactl= y it works. =20 Below is my Codes to start Server Process : =20 NioSocketAcceptor acceptor =3D new NioSocketAcceptor(); =20 acceptor.getFilterChain().addLast( "protocolFilter", new ProtocolCodecFilter( new myCodecFactory())); =20 acceptor.getFilterChain().addLast("threadPool", new ExecutorFilter(Executors.newCachedThreadPool())); =20 Regards, David Latorre wrote: >=20 > 2011/4/12 Sam.Park : >> >> >> Thanks for reply >> >> But I am afraid i already used "ExcutorFilter" =C2=A0My Code is below : >> >> acceptor.getFilterChain().addLast("threadPool", new >> ExecutorFilter(Executors.newCachedThreadPool())); >> >> Any Advice? or helpful link ? >=20 > Although my knowledge of MINA is very limited, I think that your > problem is that your server gets blocked while it is writing very > large messages, right? This seems to be caused by the I/O processor > thread and thus an Executor won't help here. Let's wait for a more > authoritive answer, but how are you instantiating your > NioSocketAcceptor? >=20 >=20 >=20 >> >> >> >> Mavlarn Tuohuti wrote: >>> >>> It seems that you used simple thread for IoHandler. You can use a threa= d >>> pool as below: >>> acceptor.getFilterChain().addLast("exceutor", new ExecutorFilter()); >>> >>> 2011/4/11 =EB=B0=95=EC=A4=80=EB=B2=94 >>> >>>> Hi >>>> >>>> I am writing Client/Server network program Using MiNA based on char >>>> server >>>> example. >>>> >>>> I have a problem to connect server from client . Connection Time out >>>> occurs >>>> while MINA Server broadcasts message(about 100kb) =C2=A0to all >>>> >>>> connected Servers. It looks like client's connect operation blocked >>>> until >>>> broadcast operation ended. It looks like I/O Connenting handle >>>> >>>> thread wait until broadcast ends. I don't know how exactly MINA's >>>> threading >>>> model to process I/O action. >>>> >>>> Broadcast opration occurred in messageReceived method on IOHandler >>>> instance. >>>> >>>> >>>> If I increase Client Time-out property more than broadcasting time. No >>>> Connection Time-out occurs on client >>>> >>>> How can i get over this situation? =C2=A0I'd like for client applicati= ons to >>>> connect to MINA Server concurrently while there are broadcasting >>>> >>>> I am using MINA =C2=A02.0.2 (NioSocketAcceptor ) and sun JDK 6 on Cent= OS 5.3 >>>> >>>> I am not good at english. So Please excuse me for my clumsy english . >>>> >>>> Regards, >>>> >>>> Park >>>> >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/I-Wonder-Why-client-connection-timeout-occurs-whil= e-the-MINA-server-broadcasts-message-to-connected-users.-tp31369411p3137514= 7.html >> Sent from the Apache MINA User Forum mailing list archive at Nabble.com. >> >> >=20 >=20 --=20 View this message in context: http://old.nabble.com/I-Wonder-Why-client-con= nection-timeout-occurs-while-the-MINA-server-broadcasts-message-to-connecte= d-users.-tp31369411p31377781.html Sent from the Apache MINA User Forum mailing list archive at Nabble.com.