org.apache.thrift.transport.TTransportException: Read a negative frame size

4,400 views
Skip to first unread message

Sanjay Dalal

unread,
Feb 25, 2014, 6:06:33 PM2/25/14
to aureliu...@googlegroups.com
Hi All,

Using Titan 0.4.2-all package but using storage of Cassandra and index with ES. JDK 1.7 (SUN). Ubuntu 13.04. 32bit. I was using Gremlin shell to count relationship A<-B starting from A with REL as label for relationship. 

g.V("indexed-prop", "value-of-indexed-prop").inE("label", "REL").count()

I was expecting a number around 200k based on my source data but I got the following. Is there any configuration I should change? Let me know. Thanks in advance.

com.thinkaurelius.titan.core.TitanException: Permanent exception during backend operation
at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:65)
at com.thinkaurelius.titan.diskstorage.BackendTransaction.executeRead(BackendTransaction.java:380)
at com.thinkaurelius.titan.diskstorage.BackendTransaction.edgeStoreQuery(BackendTransaction.java:178)
at com.thinkaurelius.titan.graphdb.database.cache.ExpirationStoreCache$2.call(ExpirationStoreCache.java:127)
at com.thinkaurelius.titan.graphdb.database.cache.ExpirationStoreCache$2.call(ExpirationStoreCache.java:123)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4792)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)
at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4789)
at com.thinkaurelius.titan.graphdb.database.cache.ExpirationStoreCache.query(ExpirationStoreCache.java:123)
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.edgeQuery(StandardTitanGraph.java:209)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx$4$2.get(StandardTitanTx.java:773)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx$4$2.get(StandardTitanTx.java:770)
at com.thinkaurelius.titan.graphdb.vertices.CacheVertex.loadRelations(CacheVertex.java:39)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx$4.execute(StandardTitanTx.java:770)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx$4.execute(StandardTitanTx.java:724)
at com.thinkaurelius.titan.graphdb.query.QueryProcessor$LimitAdjustingIterator.getNewIterator(QueryProcessor.java:231)
at com.thinkaurelius.titan.graphdb.query.LimitAdjustingIterator.hasNext(LimitAdjustingIterator.java:32)
at com.thinkaurelius.titan.graphdb.query.QueryProcessor$OuterIterator.nextInternal(QueryProcessor.java:75)
at com.thinkaurelius.titan.graphdb.query.QueryProcessor$OuterIterator.<init>(QueryProcessor.java:65)
at com.thinkaurelius.titan.graphdb.query.QueryProcessor.iterator(QueryProcessor.java:46)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:113)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:19)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.util.Pipeline.next(Pipeline.java:115)
at com.tinkerpop.pipes.util.PipeHelper.counter(PipeHelper.java:107)
at com.tinkerpop.gremlin.java.GremlinPipeline.count(GremlinPipeline.java:1534)
at com.tinkerpop.gremlin.java.GremlinFluentPipeline$count.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at groovysh_evaluate.run(groovysh_evaluate:56)
at groovysh_evaluate$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at groovysh_evaluate$run.call(Unknown Source)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:67)
at org.codehaus.groovy.tools.shell.Interpreter$evaluate.call(Unknown Source)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:152)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:114)
at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown Source)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:66)
at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:57)
at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:70)
at com.thinkaurelius.titan.tinkerpop.gremlin.Console.main(Console.java:96)
Caused by: com.thinkaurelius.titan.diskstorage.PermanentStorageException: Permanent failure in storage backend
at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.convertException(CassandraThriftKeyColumnValueStore.java:311)
at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.getNamesSlice(CassandraThriftKeyColumnValueStore.java:196)
at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.getSlice(CassandraThriftKeyColumnValueStore.java:120)
at com.thinkaurelius.titan.diskstorage.keycolumnvalue.BufferedKeyColumnValueStore.getSlice(BufferedKeyColumnValueStore.java:40)
at com.thinkaurelius.titan.diskstorage.keycolumnvalue.CachedKeyColumnValueStore.getSlice(CachedKeyColumnValueStore.java:105)
at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingStore.getSlice(ExpectedValueCheckingStore.java:77)
at com.thinkaurelius.titan.diskstorage.BackendTransaction$1.call(BackendTransaction.java:181)
at com.thinkaurelius.titan.diskstorage.BackendTransaction$1.call(BackendTransaction.java:178)
at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:62)
... 76 more
Caused by: org.apache.thrift.transport.TTransportException: Read a negative frame size (-2147418110)!
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:133)
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.cassandra.thrift.Cassandra$Client.recv_multiget_slice(Cassandra.java:664)
at org.apache.cassandra.thrift.Cassandra$Client.multiget_slice(Cassandra.java:648)
at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftKeyColumnValueStore.getNamesSlice(CassandraThriftKeyColumnValueStore.java:176)
... 83 more

b...@enigma.io

unread,
Feb 27, 2014, 12:01:33 PM2/27/14
to aureliu...@googlegroups.com
I just had this issue, too, with ~300k edges and ~200k vertices. Would love to know what configuration settings need to be modified

b...@enigma.io

unread,
Feb 27, 2014, 12:09:25 PM2/27/14
to aureliu...@googlegroups.com
I'm not sure, yet, how to fix the similar issue we ran into on the gremlin side of things, but I was able to perform the same query that crashed gremlin in Rexster and had no issue. Go to the "doghouse" in Rexster, then under extensions click "tp:gremlin". Scroll to the bottom and under the "script" parameter enter the command that crashed gremlin and click "execute". You should get the result you're looking for. 


On Tuesday, February 25, 2014 6:06:33 PM UTC-5, Sanjay Dalal wrote:

b...@enigma.io

unread,
Feb 27, 2014, 12:53:31 PM2/27/14
to aureliu...@googlegroups.com
Hey Sanjay,

I was able to fix the issue by increasing the size of the `cassandra.thrift.frame_size_mb` property in `titan-cassandra-es.properties` by adding:

`storage.cassandra.thrift.frame_size_mb=SIZE_YOU_WANT   # i set mine to 1024 for testing`

If you're using embedded cassandra, open up `cassandra.yaml` and modify both of these values:
`thrift_framed_transport_size_in_mb: 15`
`thrift_max_message_length_in_mb: 16`

NOTE: the value for `thrift_max_message_length_in_mb` must be larger than the value for `thrift_framed_transport_size_in_mb`

Ritesh Nair

unread,
Nov 14, 2014, 9:02:21 AM11/14/14
to aureliu...@googlegroups.com
Hi All,

I am running titan (0.5.1) on Ubuntu 14.04 with a standalone cassandra instance. I am accessing cassandra using the thrift protocol. 

I have loaded a graph with ~80K vertices and ~200K edges. When I query the count of outE for a vertex with ~79K outgoing edges, I run into the same issue as stated in this thread. I have tried querying using both gremlin REPL and rexster doghouse. I also run into the same issue when trying to take a dump of the graph into GraphML.

I have increased the size in both titan-cassandra-es.properties and in my cassandra.yaml file to have the below settings

// titan-cassandra-es.properties
storage.cassandra.thrift.frame_size_mb=2048
storage.cassandra.thrift.max_message_size_mb=3096

// cassandra.yaml
thrift_framed_transport_size_in_mb: 2000
thrift_max_message_length_in_mb: 2048


After I make these changes I run into another exception

Caused by: org.apache.thrift.transport.TTransportException: Frame size (57392863) larger than max length (15728640)!
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:137)
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:284)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:191)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.cassandra.thrift.Cassandra$Client.recv_multiget_slice(Cassandra.java:732)
at org.apache.cassandra.thrift.Cassandra$Client.multiget_slice(Cassandra.java:716)

I am not able to figure out why the max length still shows up as 15mb! I have deleted the cassandra db and re-tried to eliminate issues caused due to property masking.

I am able to execute this query successfully when running in the titan-cassandra-embedded-es mode.

Am I doing something incorrect? Any help appreciated! Please let me know if any more information is required.

Regards,
Ritesh

Daniel Kuppitz

unread,
Nov 14, 2014, 10:00:08 AM11/14/14
to aureliu...@googlegroups.com
Hi Ritesh,

please see the Titan Configuration Reference. The setting is called storage.cassandra.thrift.frame-size, not storage.cassandra.thrift.frame_size_mb.

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/dec781cc-c25f-4634-801c-393664436786%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

b...@enigma.io

unread,
Nov 14, 2014, 10:10:42 AM11/14/14
to aureliu...@googlegroups.com
That must have changed in the new version as it worked when I was using version `0.4.*`

Ritesh Nair

unread,
Nov 16, 2014, 10:55:02 PM11/16/14
to aureliu...@googlegroups.com
Thanks Daniel ! 

Changing to the correct property name did the trick. My queries are working now.

Regards,
Ritesh
Reply all
Reply to author
Forward
0 new messages