我們實現了RESTHEART以從MongoDB獲取聚合數據。對於單個請求,數據會很好地滿足要求。當我們通過在MongoDB上添加負載來開始在JMeter請求下檢查這個時,我們在後端得到了異常。 我們與MongoDB工程師分享了這些例外情況,他們表示可能是因爲restheart api問題。 有沒有人遇到過這些問題?RESTHEART拋出異常
@Andrea Di Cesare,對此的任何幫助將不勝感激。
以下是詳細信息 下面是一些錯誤與「內存不足」的示例URI。 REST API調用 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', '年' 時間:2014年}
錯誤服務器日誌:
[[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!
你期望有人在這裏做什麼?這個問題似乎與「API的內部工作」一樣。因此,合乎邏輯的行動是直接向維護人員提出問題。如果這不是關於「單一電話」的錯誤,而是「隨着時間的推移」發生,那麼https://github.com/softinstigate/restheart/issues將是更好的地方要問。 –
你得到的數據有多大?您可能需要爲您的java應用增加虛擬內存限制。 – Serge
@Serge我們得到的數據並不是那麼大。當你增加虛擬內存時。你在談論JMeter嗎?因爲我直接從JMeter中調用這些調用(沒有自定義API) – Abhinav1singhal