API Proxy Deployment fails with the error - "Error while accessing datastore;Please retry later”

  1. Checked the deployment status (curl -v https://api.enterprise.apigee.com/v1/o/<org-name>/apis/<api-proxyname>/revisions/<revision-number>/d... -u username:password)and noticed the same error on the MPs
"{ "error": 
   "Error while accessing datastore;Please retry later", 
    "errorCode": "datastore.ErrorWhileAccessingDataStore", 
    "status": 
       "error", 
       "type": [ "message-processor" ], 
       "uUID": "4a1a6f3d-3fb0-46ce-865f-fbd14902cf20" 
}”
	
  • Looking into the MP logs, I saw the following error
  • 2016-03-23 18:42:18,517 main ERROR DATASTORE.CASSANDRA - AstyanaxCassandraClient.fetchDynamicCompositeColumns() : Error while querying columnfamily : [api_proxy_revisions_r21, adevegowdat@v1-node-js] for rowkey:{}
    com.netflix.astyanax.connectionpool.exceptions.TransportException: TransportException: [host=None(0.0.0.0):0, latency=159(486), attempts=3]org.apache.thrift.transport.TTransportException: Frame size (20211500) larger than max length (16384000)!
            at com.netflix.astyanax.thrift.ThriftConverter.ToConnectionPoolException(ThriftConverter.java:197) ~[astyanax-thrift-1.56.43.jar:na]
    	at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:65) ~[astyanax-thrift-1.56.43.jar:na]
            at com.netflix.astyanax.thrift.ThriftColumnFamilyQueryImpl$1$2.execute(ThriftColumnFamilyQueryImpl.java:185) ~[astyanax-thrift-1.56.43.jar:na]
    ...<snipped>
    	Caused by: org.apache.thrift.transport.TTransportException: Frame size (20211500) larger than max length (16384000)!
    	at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:137) ~[libthrift-0.9.1.jar:0.9.1]
    	at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) ~[libthrift-0.9.1.jar:0.9.1]
    	at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) ~[libthrift-0.9.1.jar:0.9.1]
    	at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:362) ~[libthrift-0.9.1.jar:0.9.1]
    ...<snipped><br>
    

    What does this exception mean ? How can we resolve this ?

    Solved Solved
    0 1 919
    1 ACCEPTED SOLUTION

    I figured out that the above exception indicates that the API Proxy “v1-node-js” has exceeded the API Proxy bundle size of 15MB. This limit is because of the configuration setup in Cassandra database.

    I removed some of the unwanted node JS modules, which reduced the size of the API Proxy to about 12MB. With this change, I was able to deploy the Proxy “v1-node-js” without any errors.

    I also found that these are some of the other possible ways to address this issue:

    1. Move any of the resource files such as NodeJS Script files, JavaScript files, JAR files to environment or org level
    2. In Apigee Edge for Private Cloud, you can change the size limitation by modifying the thrift_framed_transport_size_in_mb property in the following locations: cassandra.yaml (in Cassandra) and conf/apigee/management-server/repository.properties. Refer to following links for more details on this :

    View solution in original post

    1 REPLY 1

    I figured out that the above exception indicates that the API Proxy “v1-node-js” has exceeded the API Proxy bundle size of 15MB. This limit is because of the configuration setup in Cassandra database.

    I removed some of the unwanted node JS modules, which reduced the size of the API Proxy to about 12MB. With this change, I was able to deploy the Proxy “v1-node-js” without any errors.

    I also found that these are some of the other possible ways to address this issue:

    1. Move any of the resource files such as NodeJS Script files, JavaScript files, JAR files to environment or org level
    2. In Apigee Edge for Private Cloud, you can change the size limitation by modifying the thrift_framed_transport_size_in_mb property in the following locations: cassandra.yaml (in Cassandra) and conf/apigee/management-server/repository.properties. Refer to following links for more details on this :