Permanent solution for OOM errors

2007-04-24 Thread Vinod Panicker
Hi, I think we've already got a lot of issues on the list regarding OOM errors. In reality, every server needs to be able to manage I/O efficiently to avoid high memory utilization, which ultimately results in an OOM. What can be done? MINA Connectors and Acceptors need to have the Read and Wr

[jira] Commented: (DIRMINA-372) Generics support for IoHandler

2007-04-24 Thread peter royal (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491528 ] peter royal commented on DIRMINA-372: - eero: decent idea. patches welcome :) > Generics support for IoHandler >

Re: Protocol codec filter

2007-04-24 Thread peter royal
On Apr 24, 2007, at 11:34 AM, mat wrote: I believe the protocol codec filter is to encode and decode message under each session and I believe it uses IOService threads. My question is: what if I try to boardcast the message to all sessions connected. The encode part will be executed a lot of

Re: MINA Executors Usage

2007-04-24 Thread peter royal
On Apr 23, 2007, at 4:09 PM, Pérez Paz Luis Alberto wrote: 1) I disabled the default thread model setting and I added a newCachedThreadPool in the I/O Layer: cfg.setThreadModel(ThreadModel.MANUAL); IoAcceptor acceptor = new SocketAcceptor( IO_THREADS, Executors.newCachedThreadPool());

Re: OutOfMemory

2007-04-24 Thread peter royal
On Apr 24, 2007, at 7:13 AM, mat wrote: Hi folks, Out of direct buffer memory occured again. I already setup ByteBuffer.setUseDirectBuffers(false); // Direct buffers perform bad. ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); // Disables pooling. is data arriving faster tha

Re: Authentication filter

2007-04-24 Thread peter royal
On Apr 24, 2007, at 12:18 AM, Brigham Stevens wrote: I meant to say implement Authentication ("Login", not logging) in the filterchain... This would be before the ExecutorFilter (which is last) and will be making DB requests... Those requests could potentially block the IOProcessor thread bec

Re: Can't handle events

2007-04-24 Thread peter royal
On Apr 22, 2007, at 8:36 AM, mat wrote: How mina does if it can't handle incoming events. Drop them? It is possible, right? it doesn't drop anything by default.. You'd have to implement code to do that.. -pete -- [EMAIL PROTECTED] - http://fotap.org/~osi smime.p7s Description: S/M

Re: boardcasting

2007-04-24 Thread peter royal
On Apr 21, 2007, at 8:38 AM, mat wrote: I implemented my protocol encoding in the procotol filter and I used one session one object method. I just wonder if I try to boardbast the message to N clients, which means the encoding part will be called N times? If so, should I move my encoding par

Re: packet lost

2007-04-24 Thread peter royal
On Apr 20, 2007, at 9:18 PM, mat wrote: I am doing my testing on server. I open 150 concurrent sessions. However, my server CPU useage reaches 20% and memory is increasing 300M (increasing). Also I got a Exception: Java.lang.OutOfMemoryError: Direct buffer memory. at java.nio.Bits.reserveMem

Re: Single thread multiple ports/acceptors

2007-04-24 Thread peter royal
On Apr 19, 2007, at 5:26 AM, Rob Butler wrote: I've been contemplating building a completely event driven non- blocking server using Mina. The server will have to listen to multiple ports and handle both UDP and TCP. I'd like to use a single thread for the entire application (all acceptors)

Re: JMX Performance

2007-04-24 Thread jian wu
Hi, We built OpenMBean based JMX layer on top of our Mina based gateway for management and monitoring, we don't see any significant performance degrade so far. Best regards, Jian On 4/24/07, Brigham Stevens <[EMAIL PROTECTED]> wrote: Does enabling JMX cause any significant performance hit?

JMX Performance

2007-04-24 Thread Brigham Stevens
Does enabling JMX cause any significant performance hit? I am new to JMX, but just tried the Console,and it really looks like an easy way to remote control the server. Thanks in advance!!

[jira] Commented: (DIRMINA-372) Generics support for IoHandler

2007-04-24 Thread Eero Nevalainen (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491446 ] Eero Nevalainen commented on DIRMINA-372: - Julien: then you leave type unspecified and use Object like befor

Protocol codec filter

2007-04-24 Thread mat
Hi folks, I believe the protocol codec filter is to encode and decode message under each session and I believe it uses IOService threads. My question is: what if I try to boardcast the message to all sessions connected. The encode part will be executed a lot of times. However, if I encode once an

Re: [AsyncWeb] Can we discuss here?

2007-04-24 Thread Alex Karasulu
We're close to importing the code now that the software grant for AsyncWeb has been received and filed. For now I recommend discussing it on this ML with a [AsyncWeb] prefix. We should ask infrastructure for [EMAIL PROTECTED] ML lists. So until everything is setup we should allow ourselves to d

Re: CPU usage 100%

2007-04-24 Thread Vinod Panicker
On 4/24/07, Kumaran Arul <[EMAIL PROTECTED]> wrote: Hi I am using MINA 1.1.0 and works well in Windows environment when I use 200 concurrent requests. Takes 0.45ms per request. But when I deployed my application to the HP UX machine it runs fast for first 100 requests and the CPU gets to 10

RE: OutOfMemory Exception

2007-04-24 Thread Dawie Malan
*** Click here to view our e-mail legal notice: http://www.mxit.co.za/pdfs/mxit_legal.pdf or call: +27 21 888 7000 *** Mat, It could be that your application is not proce

MINA Executors Usage

2007-04-24 Thread Pérez Paz Luis Alberto
Hi MINA community, I'm programming a server with mina 1.0.3, in order to attend concurrent clients I'm trying to have a good Executors usage. I would appreciate your opinion about my implementation: 1) I disabled the default thread model setting and I added a newCachedThreadPool in the I/O

Re: OutOfMemory Exception

2007-04-24 Thread mat
I believe NIO buffer does use direct buffer memory, right? Actually i got Out of direct buffer memory exception. BTW, my physical memory is 4G. 2007/4/24, Niklas Therning <[EMAIL PROTECTED]>: mat wrote: > Hi folks, > > Out of direct buffer memory exception occured again. I already did > By

Re: OutOfMemory Exception

2007-04-24 Thread Niklas Therning
mat wrote: > Hi folks, > > Out of direct buffer memory exception occured again. I already did > ByteBuffer.setUseDirectBuffers(false); // Direct buffers perform > bad. > ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); // > Disables > pooling. > > Why still get this exception? S

Re: OutOfMemory Exception

2007-04-24 Thread mat
As I knew, Direct buffer memory is not collected by GC. Am I right? 2007/4/24, Mark Webb <[EMAIL PROTECTED]>: depending on your machine, I would increase the MaxDirectMemorySize parameter to maybe 512M to start with. -- ..Cheers Mark On 4/24/07, mat <[EMAIL PROTECTED]> wrote: > Hi folks, > >

Re: OutOfMemory Exception

2007-04-24 Thread Mark Webb
depending on your machine, I would increase the MaxDirectMemorySize parameter to maybe 512M to start with. -- ..Cheers Mark On 4/24/07, mat <[EMAIL PROTECTED]> wrote: Hi folks, Out of direct buffer memory exception occured again. I already did ByteBuffer.setUseDirectBuffers(false); //

[jira] Commented: (DIRMINA-372) Generics support for IoHandler

2007-04-24 Thread Niklas Therning (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491294 ] Niklas Therning commented on DIRMINA-372: - I've thought of something similar: provide an IoHandler implement

OutOfMemory Exception

2007-04-24 Thread mat
Hi folks, Out of direct buffer memory exception occured again. I already did ByteBuffer.setUseDirectBuffers(false); // Direct buffers perform bad. ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); // Disables pooling. Why still get this exception? Should I still increasing max

OutOfMemory

2007-04-24 Thread mat
Hi folks, Out of direct buffer memory occured again. I already setup ByteBuffer.setUseDirectBuffers(false); // Direct buffers perform bad. ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); // Disables pooling.

[jira] Commented: (DIRMINA-372) Generics support for IoHandler

2007-04-24 Thread Julien Vermillard (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491282 ] Julien Vermillard commented on DIRMINA-372: --- why not, but if some codec produce Object of different types

[jira] Created: (DIRMINA-372) Generics support for IoHandler

2007-04-24 Thread Eero Nevalainen (JIRA)
Generics support for IoHandler -- Key: DIRMINA-372 URL: https://issues.apache.org/jira/browse/DIRMINA-372 Project: MINA Issue Type: Improvement Affects Versions: 1.1.0 Reporter: Eero Nevalainen

Re: CPU usage 100%

2007-04-24 Thread mat
Did you put: ByteBuffer.setUseDirectBuffers(false); // Direct buffers perform bad. ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); // Disables pooling. It helps. 2007/4/24, Kumaran Arul <[EMAIL PROTECTED]>: Hi I am using MINA 1.1.0 and works well in Windows environment when I us

Re: Checking if connectionb is alive.

2007-04-24 Thread Vinod Panicker
On 4/24/07, Uday Prakash (DHL CZ) <[EMAIL PROTECTED]> wrote: Hi, I also realized that the IoSession ifc, has a method isConnected(), this returns if the current session is connected to a remote peer. This is pretty useful and helpful. That's exactly what I was referring to when I said "no reli

RE: Checking if connectionb is alive.

2007-04-24 Thread Uday Prakash \(DHL CZ\)
Hi, I also realized that the IoSession ifc, has a method isConnected(), this returns if the current session is connected to a remote peer. This is pretty useful and helpful. Thank you for all your pointers, -Uday -Original Message- From: Vinod Panicker [mailto:[EMAIL PROTECTED] Sent:

RE: Checking if connectionb is alive.

2007-04-24 Thread Brigham Stevens
I am using this: IoSession s = con.getIoSession(); if(s.isConnected() && con.alive) { s.write(msg); } Also my app sends Pings every 2 minutes, and I've set the idle timer to 2 minutes in sessionOpened, using session.setIdleTime, and use the idle

Re: Checking if connectionb is alive.

2007-04-24 Thread Vinod Panicker
On 4/24/07, Uday Prakash (DHL CZ) <[EMAIL PROTECTED]> wrote: Hi, I was looking thru some documentation online and realized that there is no standard way [well, at least I didn't find any, may be I didn't look hard enough or in the right place] to check if a tcp/ip connection is alive between the

[AsyncWeb] Can we discuss here?

2007-04-24 Thread wolverine my
On 4/17/07, James Im <[EMAIL PROTECTED]> wrote: >* Can someone help me to subscribe to AsyncWeb's mailing list? It seem >that there is no response after I sent email to >[EMAIL PROTECTED] I think that the list is not working correctly for the moment. I'm sorry but I need your help here... where

Checking if connectionb is alive.

2007-04-24 Thread Uday Prakash \(DHL CZ\)
Hi, I was looking thru some documentation online and realized that there is no standard way [well, at least I didn't find any, may be I didn't look hard enough or in the right place] to check if a tcp/ip connection is alive between the server and client. The reason I am posting is, to figure out

Re: svn commit: r531099 - in /mina/branches/1.1/example/src/main/java/org/apache/mina/example/chat/client: ChatClientSupport.java SwingChatClient.java

2007-04-24 Thread Trustin Lee
Does this change affect the 1.0 branch either? Then we need to merge this change there too. Trustin On 4/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Author: proyal Date: Sat Apr 21 13:06:05 2007 New Revision: 531099 URL: http://svn.apache.org/viewvc?view=rev&rev=531099 Log: Fix exampl

RE: Authentication filter

2007-04-24 Thread Brigham Stevens
Woops I had a typo.. # > Thanks for your answer. # > If I implemented logging in the filterchain, doesn't that have a # > chance of blocking IO on the server until it completes, because the # > filters are running in the IoProcessor thread? # I meant to say implement Authentication ("Login