This thread is being created by the Spring aspects: net.atos.mm.fwk.wpm.media.GenericMessageTransportAgent. on the server side. This doesn't have anything to do with CXF that I can tell.
The only thing I can think of is with the async clients, you have many more requests hitting the server at the same time causing a lot more to happen at once. I think there is a setting in Tomcat someplace to limit the number of simultaneous connections. That may be applicable here. Dan On Wednesday 17 November 2010 8:33:25 am Villoud Pierre Julien wrote: > Here is the complete stack : > > ATTENTION: Application (...) has thrown exception, unwinding now > org.apache.cxf.interceptor.Fault: unable to create new native thread > at > org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker > .java:155) at > org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSM > ethodInvoker.java:86) at > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java > :121) at > org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60) > at > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java > :75) at > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerI > nterceptor.java:58) at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at > java.util.concurrent.FutureTask.run(FutureTask.java:123) at > org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.j > ava:37) at > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Service > InvokerInterceptor.java:106) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha > in.java:244) at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiation > Observer.java:110) at > org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinat > ion.java:98) at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servl > etController.java:423) at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletControlle > r.java:178) at > org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServ > let.java:142) at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Abstrac > tHTTPServlet.java:179) at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPSe > rvlet.java:103) at > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPS > ervlet.java:159) at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati > onFilterChain.java:252) at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter > Chain.java:173) at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. > java:213) at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. > java:178) at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 > 26) at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 > 05) at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja > va:107) at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148 > ) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:70 > 6) at > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.ja > va:898) at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j > ava:684) at java.lang.Thread.run(Thread.java:595) > Caused by: java.lang.OutOfMemoryError: unable to create new native thread > at java.lang.Thread.start0(Native Method) > at java.lang.Thread.start(Thread.java:574) > at > net.atos.mm.fwk.wpm.media.GenericMessageTransportAgent.startSenders(Unknow > n Source) at > net.atos.mm.fwk.wpm.media.GenericMessageTransportAgent.send(Unknown > Source) at > fr.cnaf.sms.core.impl.SmsSenderImpl.send(SmsSenderImpl.java:293) at > fr.cnaf.sms.core.impl.SmsSenderImpl.sendMessageTemplate(SmsSenderImpl.java > :161) at > fr.cnaf.sms.core.impl.SmsSenderImpl.sendMessageTemplate(SmsSenderImpl.java > :175) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm > pl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Ao > pUtils.java:309) at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoi > nt(ReflectiveMethodInvocation.java:183) at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle > ctiveMethodInvocation.java:150) at > org.springframework.transaction.interceptor.TransactionInterceptor.invoke( > TransactionInterceptor.java:110) at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle > ctiveMethodInvocation.java:172) at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopP > roxy.java:202) at $Proxy29.sendMessageTemplate(Unknown Source) > at > fr.cnaf.sms.ws.SmsSenderServiceImpl.sendMessageTemplateDoublon(SmsSenderSe > rviceImpl.java:42) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown > Source) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm > pl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractI > nvoker.java:173) at > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java > :89) ... 34 more > > -----Message d'origine----- > De : Daniel Kulp [mailto:[email protected]] > Envoyé : mercredi 17 novembre 2010 13:46 > À : [email protected] > Cc : Villoud Pierre Julien > Objet : Re: Using CXF asynchronously > > On Wednesday 17 November 2010 7:42:09 am Villoud Pierre Julien wrote: > > So I increased the memory, and decreased the ReceiveTimeout and the > > ConnectionTimeout down to 1500 milliseconds, and still, at some point, > > i'm getting "java.lang.OutOfMemoryError: unable to create new native > > thread"... > > > > I don't know what else to do ! > > Is there a full stack trace for that? > > Dan > > > Pierre-Julien > > > > -----Message d'origine----- > > De : Daniel Kulp [mailto:[email protected]] > > Envoyé : lundi 15 novembre 2010 17:45 > > À : Villoud Pierre Julien > > Cc : [email protected] > > Objet : Re: Using CXF asynchronously > > > > On Monday 15 November 2010 11:41:41 am Villoud Pierre Julien wrote: > > > Hello an sorry about the very late reply. > > > > > > I think that the request actually timeouts, but the out of memory > > > errors happened when a lot of request are made and my guess is that > > > there are more request made than request that timeout. So at some > > > point, a out of memory error occurs. I am doubling the memory of my > > > Tomcat and see how it goes. I'll keep you posted. > > > > If you really don't care about the response, you could also decrease the > > timeout to something a LOT smaller than 60 seconds. See: > > > > http://cxf.apache.org/docs/client-http-transport-including-ssl-support.ht > > ml > > > > for the ReceiveTimeout setting. Drop it to 2 seconds or something and > > they should start timing out pretty quick. > > > > Dan > > > > > Thanks again for your help > > > > > > Pierre-Julien > > > > > > -----Message d'origine----- > > > De : Daniel Kulp [mailto:[email protected]] > > > Envoyé : mercredi 10 novembre 2010 19:52 > > > À : [email protected] > > > Cc : Villoud Pierre Julien > > > Objet : Re: Using CXF asynchronously > > > > > > On Wednesday 10 November 2010 2:50:02 am Villoud Pierre Julien wrote: > > > > Hi and thanks for your answer (@Steve I'm sorry, I didn't mean to > > > > steal your question...) > > > > > > > > I'm using the 2.2.10 version. So what happens if a lot of call like > > > > this happen : client.invoke(new ClientCallback(), "methodName", > > > > params...); > > > > > > > > You think that the request should timeout ? > > > > > > Yes, it should. By default it's 60 seconds. That said, if the > > > server actually responds, it should just complete normally and the > > > callback called. > > > > > > Is there any chance you could create a small testcase (like modify the > > > jaxws_async example) that shows the problems? > > > > > > Dan > > > > > > > I'm really not expecting > > > > anything in return that's why i'm calling the invoke function like > > > > this. I have a Hello World method but I don't have much time to test. > > > > If it's not something you already have heard of, I will go back to > > > > synchronous calls and work on that as soon as I can. > > > > > > > > Thanks again > > > > > > > > Pierre-Julien > > > > > > -- > > > Daniel Kulp > > > [email protected] > > > http://dankulp.com/blog > > > > > > > > > > > > Ce message et les pièces jointes sont confidentiels et réservés à > > > l'usage exclusif de ses destinataires. Il peut également être protégé > > > par le secret professionnel. Si vous recevez ce message par erreur, > > > merci d'en avertir immédiatement l'expéditeur et de le détruire. > > > L'intégrité du message ne pouvant être assurée sur Internet, la > > > responsabilité du groupe Atos Origin ne pourra être recherchée quant > > > au contenu de ce message. Bien que les meilleurs efforts soient faits > > > pour maintenir cette transmission exempte de tout virus, l'expéditeur > > > ne donne aucune garantie à cet égard et sa responsabilité ne saurait > > > être recherchée pour tout dommage résultant d'un virus transmis. > > > > > > This e-mail and the documents attached are confidential and intended > > > solely for the addressee; it may also be privileged. If you receive > > > this e-mail in error, please notify the sender immediately and destroy > > > it. As its integrity cannot be secured on the Internet, the Atos > > > Origin group liability cannot be triggered for the message content. > > > Although the sender endeavours to maintain a computer virus-free > > > network, the sender does not warrant that this transmission is > > > virus-free and will not be liable for any damages resulting from any > > > virus transmitted. > > > > -- > > Daniel Kulp > > [email protected] > > http://dankulp.com/blog > > > > > > > > Ce message et les pièces jointes sont confidentiels et réservés à l'usage > > exclusif de ses destinataires. Il peut également être protégé par le > > secret professionnel. Si vous recevez ce message par erreur, merci d'en > > avertir immédiatement l'expéditeur et de le détruire. L'intégrité du > > message ne pouvant être assurée sur Internet, la responsabilité du groupe > > Atos Origin ne pourra être recherchée quant au contenu de ce message. > > Bien que les meilleurs efforts soient faits pour maintenir cette > > transmission exempte de tout virus, l'expéditeur ne donne aucune > > garantie à cet égard et sa responsabilité ne saurait être recherchée > > pour tout dommage résultant d'un virus transmis. > > > > This e-mail and the documents attached are confidential and intended > > solely for the addressee; it may also be privileged. If you receive this > > e-mail in error, please notify the sender immediately and destroy it. As > > its integrity cannot be secured on the Internet, the Atos Origin group > > liability cannot be triggered for the message content. Although the > > sender endeavours to maintain a computer virus-free network, the sender > > does not warrant that this transmission is virus-free and will not be > > liable for any damages resulting from any virus transmitted. > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > > > > Ce message et les pièces jointes sont confidentiels et réservés à l'usage > exclusif de ses destinataires. Il peut également être protégé par le > secret professionnel. Si vous recevez ce message par erreur, merci d'en > avertir immédiatement l'expéditeur et de le détruire. L'intégrité du > message ne pouvant être assurée sur Internet, la responsabilité du groupe > Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien > que les meilleurs efforts soient faits pour maintenir cette transmission > exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard > et sa responsabilité ne saurait être recherchée pour tout dommage > résultant d'un virus transmis. > > This e-mail and the documents attached are confidential and intended solely > for the addressee; it may also be privileged. If you receive this e-mail > in error, please notify the sender immediately and destroy it. As its > integrity cannot be secured on the Internet, the Atos Origin group > liability cannot be triggered for the message content. Although the sender > endeavours to maintain a computer virus-free network, the sender does not > warrant that this transmission is virus-free and will not be liable for > any damages resulting from any virus transmitted. -- Daniel Kulp [email protected] http://dankulp.com/blog
