Product/components used and version/fix level:
Cumulocity Production
Detailed explanation of the problem:
Hi, I have deployed one microservice which fetches around 1500 values three times for each M.O.
Now, while fetching the measurements from the DB, the service restarts.
In local it works perfectly fine but we are not able to identify why the service is restarting while fetching values from DB.
try { subscriptionsService.runForEachTenant(() -> { MeasurementFilter filter = new MeasurementFilter().bySource(new GId(deviceID)).byType(type) .byValueFragmentSeries(series).byDate(dateFrom, dateTo); Iterable<MeasurementRepresentation> measColl = measurementApi.getMeasurementsByFilter(filter).get(2000).allPages(); List<MeasurementRepresentation> measList = StreamSupport.stream(measColl.spliterator(), false).toList(); List<Double> list = fetchValues(measList, series); // This method separates the values from the sample structure. map.put("list", list); });
Sample Structure is like this:
"measurement": {
"A": {
"value": 81.9
},
"B": {
"value": 26.55
},
"C": {
"value": 100
},
"D": {
"value": 102.37
},
"E": {
"value": 5625.96
},
"F": {
"value": 22129.44
},
"G": {
"value": 2.54
},
"H": {
"value": 99
},
"I": {
"value": 98
},
"J": {
"value": 247.22
},
"K": {
"value": 0
},
"L": {
"value": 98
},
"M": {
"value": 100
},
"N": {
"value": 393.87
},
"O": {
"value": 180.81
},
"P": {
"value": 804.66
},
"Q": {
"value": 78.03
},
"R": {
"value": 99
},
"S": {
"value": 84
},
"T": {
"value": 100
},
"U": {
"value": 5.11
},
"V": {
"value": 99
},
"W": {
"value": 87
},
"X": {
"value": 31.36
},
"Y": {
"value": 1188.39
},
"Z": {
"value": 817.82
},
"AA": {
"value": 90.64
},
"AB": {
"value": 521.41
},
"AC": {
"value": 42.34
},
"AD": {
"value": 196.16
},
"AE": {
"value": 46.24
},
"AF": {
"value": 724.43
} //and so on
}
}
Let me know if you have any idea what the issue is.