Skip to main content



      Home
Home » Modeling » EMF » [CDO] starnge error after aproximately 200 requests to db
[CDO] starnge error after aproximately 200 requests to db [message #1386522] Wed, 18 June 2014 02:12 Go to next message
Eclipse UserFriend
After approximately 200 requests to db I have error (practically all the time):

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Channel registration timeout after 10000 milliseconds
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:322)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:194)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
Caused by: org.apache.cxf.interceptor.Fault: org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Channel registration timeout after 10000 milliseconds
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
... 31 more
Caused by: org.eclipse.net4j.channel.ChannelException: org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Channel registration timeout after 10000 milliseconds
at org.eclipse.spi.net4j.ChannelMultiplexer.openChannel(ChannelMultiplexer.java:174)
at org.eclipse.spi.net4j.ChannelMultiplexer.openChannel(ChannelMultiplexer.java:1)
at org.eclipse.net4j.signal.SignalProtocol.open(SignalProtocol.java:150)
at org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionImpl.createProtocol(CDONet4jSessionImpl.java:212)
at org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionImpl.openSession(CDONet4jSessionImpl.java:237)
at org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionImpl.doActivate(CDONet4jSessionImpl.java:139)
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalActivate(ShareableLifecycle.java:43)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
at org.eclipse.emf.internal.cdo.session.CDOSessionConfigurationImpl.openSession(CDOSessionConfigurationImpl.java:359)
at org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionConfigurationImpl.openNet4jSession(CDONet4jSessionConfigurationImpl.java:104)
...
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
... 36 more
Caused by: org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Channel registration timeout after 10000 milliseconds
at org.eclipse.spi.net4j.ChannelMultiplexer.openChannel(ChannelMultiplexer.java:165)
... 60 more
Caused by: org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Registration timeout after 10,000 milliseconds
at org.eclipse.net4j.internal.tcp.ControlChannel.registerChannel(ControlChannel.java:102)
at org.eclipse.net4j.internal.tcp.TCPConnector.registerChannelWithPeer(TCPConnector.java:360)
at org.eclipse.spi.net4j.ChannelMultiplexer.openChannel(ChannelMultiplexer.java:159)
... 60 more



Could you investigate about this problem ?
Re: [CDO] starnge error after aproximately 200 requests to db [message #1386539 is a reply to message #1386522] Wed, 18 June 2014 04:08 Go to previous messageGo to next message
Eclipse UserFriend
I think the JVM has run nearly out of memory. Perhaps some used instances needs to be cleaned up?

[Updated on: Wed, 18 June 2014 04:08] by Moderator

Re: [CDO] starnge error after aproximately 200 requests to db [message #1386542 is a reply to message #1386539] Wed, 18 June 2014 04:14 Go to previous messageGo to next message
Eclipse UserFriend
Are you opening one CDOSession for each connection? You can use the CDOSession and for example a CDOView globally which are provided by (you by) an OSGI-Service.
Re: [CDO] starnge error after aproximately 200 requests to db [message #1386547 is a reply to message #1386542] Wed, 18 June 2014 04:41 Go to previous messageGo to next message
Eclipse UserFriend
Yes, we are using CDOSession for each connection, but we close this session after each request...

Pseudo-code of our request:

1) Opening session
2) Opening transaction
3) Request to db
4) Rollback of transaction (this is a workaround preventing some odd CDO behavior, when entities were magically detached and as a result removed from the database (!!!) )
5) Session closing.

What do you think about this method of querying db ?
Re: [CDO] starnge error after aproximately 200 requests to db [message #1386559 is a reply to message #1386547] Wed, 18 June 2014 05:23 Go to previous messageGo to next message
Eclipse UserFriend
I only describe my experience, perhaps there are also flaws.

> 1) Opening session

The Session should be reused, otherwise the (local) caching features from CDO are not used.

> 2) Opening transaction

Try the CDOView with passive updates disabled.

> 3) Request to db

Ok Smile

> 4) Rollback of transaction (this is a workaround preventing some odd CDO behavior, when entities were magically detached and as a result removed from the database (!!!) )

You can configure that a CDOView doesn't receive Passive Updates. It should work. For testing you don't need to rollback the transaction if it is closed and not reused.

> 5) Session closing.

See 1)
Re: [CDO] starnge error after aproximately 200 requests to db [message #1386920 is a reply to message #1386559] Mon, 23 June 2014 02:34 Go to previous messageGo to next message
Eclipse UserFriend
ok, thank you

I changed my code according to your suggestions, but this problem still exist...


public void executeSTH()
{
CDOSession activeSession = cdoSP.getActiveSess();
CDOView view = activeSess.openView();

executeIn(view);
}


public void executeIn(CDOView view)
{
try {
String pSQL = "select * ...");
CDOQuery query = view.createQuery("sql", pSQL);

result.addAll(query.getResult(A.class));
} catch (Exception ex) {
System.out.println("!!!");
}
}
}
Re: [CDO] starnge error after aproximately 200 requests to db [message #1386929 is a reply to message #1386920] Mon, 23 June 2014 03:21 Go to previous messageGo to next message
Eclipse UserFriend
Nobody closes the CDOView?

The User who processes the result should open and close the view. (But it would be better if the view could be used globally)

[Updated on: Mon, 23 June 2014 03:21] by Moderator

Re: [CDO] starnge error after aproximately 200 requests to db [message #1387102 is a reply to message #1386929] Tue, 24 June 2014 02:52 Go to previous messageGo to next message
Eclipse UserFriend
I added closing for CDOView. But problem still exist.
In this case I run my apps on virtual machine with Windows (earlier run - virtual machine with linux)

On Windows I have additional error:

Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at org.eclipse.internal.net4j.buffer.BufferPool.doActivate(BufferPool.java:177)
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
at org.eclipse.net4j.util.container.ManagedContainer.activateElement(ManagedContainer.java:340)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:325)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:301)
at org.eclipse.net4j.TransportInjector.getBufferProvider(TransportInjector.java:102)
at org.eclipse.net4j.TransportInjector.processConnector(TransportInjector.java:83)
at org.eclipse.net4j.TransportInjector.process(TransportInjector.java:51)
at org.eclipse.net4j.util.container.ManagedContainer.postProcessElement(ManagedContainer.java:570)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:321)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:301)
at org.eclipse.net4j.tcp.TCPUtil.getConnector(TCPUtil.java:65)
...
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
... 37 more

Re: [CDO] starnge error after aproximately 200 requests to db [message #1387132 is a reply to message #1387102] Tue, 24 June 2014 06:25 Go to previous messageGo to next message
Eclipse UserFriend
I found problem and I described this issue in this post: https://www.eclipse.org/forums/index.php/m/1387131/#msg_1387131
Re: [CDO] starnge error after aproximately 200 requests to db [message #1388405 is a reply to message #1387132] Thu, 26 June 2014 07:48 Go to previous message
Eclipse UserFriend
I have done a little testing with opening many many CDOView parallel. I could not reproduce your situation. (I am using CDO with Postgres and H2 under linux and windows)

The best way would be, if you could wrap up the problem in a Unittest for CDO.

Previous Topic:Add GenModel option for platform scheme-aware URIs in XXXEditor.doSave()
Next Topic:[CDO] DBStore postresql
Goto Forum:
  


Current Time: Sat Jul 05 17:18:58 EDT 2025

Powered by FUDForum. Page generated in 0.19835 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top