we implemented RESTHEART to get aggregated data from MongoDB. For single requests , the data is coming up fine and meets the requirement. When we started checking this under JMeter requests by adding load on MongoDB we got exceptions at backend. We shared these exceptions with MongoDB engineers and they are indicating it could be because of restheart api issue. Has anyone faced these issues before?
@Andrea Di Cesare , any help on this will be greatly appreciated.
Below is detail Below are the examples URI which error out with “Out of memory”. REST API CALLS http://ftc-lbeapoc202:8080/statdata/InsStatData/_aggrs/getStatDataByIssuerIdSectionName?avars={'issuerId':66915,'sectionName':'SCDPT1'} http://ftc-lbeapoc202:8080/statdata/InsStatData/_aggrs/getStatDataByIssuerIdSectionName?avars={'issuerId':66915,'sectionName':'SCDPT1','year':2014}
Error in server log:
[[1;31mERROR^[[0;39m org.restheart.handlers.ErrorHandler - Error handling
the request
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3554)
at java.util.Arrays.copyOf(Arrays.java:3525)
at java.util.ArrayList.grow(ArrayList.java:272)
at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:246)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:238)
at java.util.ArrayList.add(ArrayList.java:469)
at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84)
at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41)
at com.mongodb.operation.CommandResultArrayCodec.decode(CommandResultArrayCodec.java:52)
at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:53)
at org.bson.codecs
Error in response:
{
· _exceptions:
[
o {
§ exception: "java.lang.OutOfMemoryError",
§ exception message: "Java heap space"
}
],
· http status code: 500,
· http status description: "Internal Server Error",
· message: "Error handling the request, see log for more
information"
}
Thanks!