cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Out of memory error by jetty logs.
Date Mon, 09 Aug 2010 20:48:04 GMT
On Monday 09 August 2010 3:35:24 pm Kessel, Christopher wrote:
> Does this mean there is a known memory leak in 2.2.7 (or 2.2.6 in my
> case) or just general advice that it'd be good to upgrade? We're about
> to go live into production with 2.2.6 and there's no way I can upgrade
> without pulling the plug and causing a week or two of revalidation after
> upgrading the CXF library.

I wouldn't say a leak in 2.2.6/7 as much as I'd say we've put some hacks in 
place to workaround bugs in the JDK.  It's mostly around re-deployment of wars 
and not so much a normal production use case of deploy once and let it run.

You can see some comments in:
http://svn.apache.org/repos/asf/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java



Dan 



> 
> Thanks,
> Chris
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, August 09, 2010 12:31 PM
> To: users@cxf.apache.org
> Cc: Naresh Tallapelli; dev@cxf.apache.org
> Subject: Re: Out of memory error by jetty logs.
> 
> 
> Definitely try 2.2.9.   That may help.
> 
> Alternatively, set a JVM param of something like -XX:MaxPermSize=148m or
> 
> similar.  The default PermGen space is relatively small for many complex
> 
> applications that use a lot of small classes.   If you are using a 64bit
> JVM
> it's especially bad as the space fills that much quicker.
> 
> Dan
> 
> On Friday 06 August 2010 8:03:58 am Naresh Tallapelli wrote:
> > Hi All,
> > 
> > I am using cxf-2.2.7 version. When i send a request from client to
> 
> server i
> 
> > am getting the following exception on the server after the response is
> 
> sent
> 
> > to the client. After that subsequent requests are not getting
> 
> processed by
> 
> > the server.
> > 
> > 53421 2010-08-06 17:25:29,691 [btpool0-1] ERROR org.mortbay.log  -
> > EXCEPTION
> > 
> > java.lang.OutOfMemoryError: PermGen space
> > 
> >     at java.lang.ClassLoader.defineClass1(Native Method)
> >     at java.lang.ClassLoader.defineClass(Unknown Source)
> >     at java.security.SecureClassLoader.defineClass(Unknown Source)
> >     at java.net.URLClassLoader.defineClass(Unknown Source)
> >     at java.net.URLClassLoader.access$000(Unknown Source)
> >     at java.net.URLClassLoader$1.run(Unknown Source)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at java.net.URLClassLoader.findClass(Unknown Source)
> >     at java.lang.ClassLoader.loadClass(Unknown Source)
> >     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >     at java.lang.ClassLoader.loadClass(Unknown Source)
> >     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >     at
> > 
> > org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:306)
> > 
> >     at
> 
> org.mortbay.jetty.HttpConnection.commitResponse(HttpConnection.java:580)
> 
> >     at
> > 
> > org.mortbay.jetty.HttpConnection$Output.close(HttpConnection.java:889)
> > 
> >     at
> 
> org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStrea
> m.c
> 
> > lose(AbstractHTTPDestination.java:628) at
> 
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutpu
> tSt
> 
> > ream.java:47) at
> 
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 
> >     at
> 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 
> >     at
> 
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
> nte
> 
> > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hai
> 
> > n.java:243) at
> 
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outgoi
> ngC
> 
> > hainInterceptor.java:76) at
> 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hai
> 
> > n.java:243) at
> 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> onO
> 
> > bserver.java:110) at
> 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(
> Jet
> 
> > tyHTTPDestination.java:312) at
> 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Jetty
> HTT
> 
> > PDestination.java:276) at
> 
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHan
> dle
> 
> > r.java:70) at
> 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
> 
> >     at
> 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Col
> 
> > lection.java:206) at
> 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 
> >     at org.mortbay.jetty.Server.handle(Server.java:324)
> >     at
> 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> 
> > 54499 2010-08-06 17:25:30,769 [btpool0-1] ERROR org.mortbay.log  -
> 
> handle
> 
> > failed
> > java.lang.IllegalStateException: last?
> > 
> >     at
> > 
> > org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:256)
> > 
> >     at
> 
> org.mortbay.jetty.AbstractGenerator.sendError(AbstractGenerator.java:465
> )
> 
> >     at
> 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
> 
> >     at
> 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava
> 
> > :842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)
> 
> at
> 
> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at
> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at
> 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 395
> 
> > ) at
> 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> 
> va:
> > 450)
> > 
> > The response size is 2 kb only. I am not sure why this is happened.
> 
> Please
> 
> > help me to resolve this issue.
> > 
> > Any help is much appreciated.
> > 
> > Thanks in advance.
> > 
> > --Naresh

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message