mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carter" <Scott.Car...@conexant.com>
Subject Out of Memory issues with our mina proxy
Date Sat, 20 Oct 2007 23:07:54 GMT
We have written a server proxy layer using the mina library, and
everything works as it should except we are running into "Out of Memory"
exceptions.  We did the obvious things such as increasing the memory for
the proxy and still always had the same issue (just took a little longer
to produce it).  We analyzed the application with a profiler and
discovered that a thread from mina was creating LinkedBlockingQueue$Node
objects that were not being garbage collected.  I read a couple of
previous posts on the issue and could not find a good solution.  Based
on the posts I did verify that these objects were not being garbage
collected even after the server had been idol for a long time and all
sessions had been closed.  

 

Our proxy binds to the outside port of a version control server and
passes data back and fourth between clients and the version control
server.  I have attached our code, which is pretty simple, to this post.
You can see that we have some methods that take a few bites off of the
messages and verify the client for us, but other than that this is just
a very straight forward proxy application.  

 

I really need some help to figure out how to get the
LinkedBlockingQueue$Node objects garbage collected.  I have posted below
the stack trace that creates the LinkedBlockingQueue$Node objects from
the mina thread:

 

TRACE 319549: (thread=200037)

 
java.util.concurrent.LinkedBlockingQueue$Node.<init>(LinkedBlockingQueue
.java:70)

 
java.util.concurrent.LinkedBlockingQueue.insert(LinkedBlockingQueue.java
:129)

 
java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:
335)

 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:
653)

 
org.apache.mina.filter.executor.ExecutorFilter.fireEvent(ExecutorFilter.
java:101)

 
org.apache.mina.filter.executor.ExecutorFilter.messageSent(ExecutorFilte
r.java:214)

 
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent
(AbstractIoFilterChain.java:320)

 
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(Abstrac
tIoFilterChain.java:53)

 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.message
Sent(AbstractIoFilterChain.java:652)

 
org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageS
ent(AbstractIoFilterChain.java:503)

 
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent
(AbstractIoFilterChain.java:320)

 
org.apache.mina.common.support.AbstractIoFilterChain.fireMessageSent(Abs
tractIoFilterChain.java:314)

 
org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoP
rocessor.java:358)

 
org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoP
rocessor.java:314)

 
org.apache.mina.transport.socket.nio.SocketIoProcessor.access$600(Socket
IoProcessor.java:44)

 
org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(Socket
IoProcessor.java:431)

 
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.j
ava:39)

        java.lang.Thread.run(Thread.java:619)

 

 

Thank you in advance for helping a Newbie.  This is a production
application that I need to get working ASAP.  Thanks - Scott


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended
recipient. Any unauthorized review, use or distribution by others is strictly prohibited.
If you have received the message in error, please advise the sender by reply email and delete
the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------


Mime
View raw message