Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Timeout while prefetching
[CDO] Timeout while prefetching [message #1776096] Fri, 10 November 2017 15:20 Go to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
Hi
When fetching rather large collections, we sometimes get a timeoutexception, and the prefetch takes a long time to finish (around 1-2 minutes for a tree with 5000 Objects) . The Exception does not cancel the prefetching and looks like this:

org.eclipse.emf.cdo.common.util.TransportException: java.util.concurrent.TimeoutException
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:613)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:638)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadRevisions(CDOClientProtocol.java:203)
at org.eclipse.emf.internal.cdo.session.DelegatingSessionProtocol.loadRevisions(DelegatingSessionProtocol.java:687)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:431)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:309)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:291)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:284)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:1)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.prefetchRevisions(CDOViewImpl.java:1129)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.prefetchRevisions(CDOViewImpl.java:1117)
at org.eclipse.emf.internal.cdo.CDOObjectImpl.cdoPrefetch(CDOObjectImpl.java:224)
...
Caused by: java.util.concurrent.TimeoutException
at org.eclipse.net4j.util.io.IOTimeoutException.createTimeoutException(IOTimeoutException.java:46)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:287)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:466)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:605)
... 20 more
Caused by: org.eclipse.net4j.util.io.IOTimeoutException
at org.eclipse.net4j.buffer.BufferInputStream.computeTimeout(BufferInputStream.java:261)
at org.eclipse.net4j.buffer.BufferInputStream.ensureBuffer(BufferInputStream.java:217)
at org.eclipse.net4j.buffer.BufferInputStream.read(BufferInputStream.java:139)
at java.io.DataInputStream.readBoolean(Unknown Source)
at org.eclipse.net4j.util.io.ExtendedDataInput$Delegating.readBoolean(ExtendedDataInput.java:68)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo$Available.readRevision(RevisionInfo.java:423)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:165)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:142)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:1)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequest.confirming(CDOClientRequest.java:97)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:377)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:283)
... 24 more

After the prefetch finished, running it again takes approximately the same time, and sometimes yields the same error. Should'nt it be significantly faster, as the objects are all already prefetched?

We are running CDO 4.5


Greetings,
Samuel Leisering
Re: [CDO] Timeout while prefetching [message #1776502 is a reply to message #1776096] Fri, 17 November 2017 06:01 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Samuel,

How large are these objects and how much free memory is available when you load the revisions? If not enough free memory is available it's possible that already loaded revisions are immediately garbage collected. You can try to pevent that by registering a listener to the revision manager of the session and installing a strong reference to the loaded revisions when a CDORevisionsLoadedEvent is received. Of course that could lead to a OutOfMemoryError then.

Cheers
/Eike


Previous Topic:[xcore] using "id" as attribute name
Next Topic:[xcore] Error in the generated code, when a type with generics is wrapped and used as argument
Goto Forum:
  


Current Time: Fri Apr 26 11:35:28 GMT 2024

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

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

Back to the top