Error with AnalyticsContainer.loadDFE() stating that it could not acquire lock for a key because lock already exists


This is regarding ACE. I’m trying to loadDFE using

var input = AnalyticsContainer.loadDFE("MonitorAnomalyDetectionAnalyticInput", {id: "8815594", typeName: "MonitorAsset"}, "2017-01-01")

It throws this error message:
unable to load metric 'ThreePhmtC2H4Ppm' for ID 8815594 (start 2016-01-26T00:00:00.000Z, end 2016-01-27T00:00:00.000Z):↵↵C3RuntimeException: MetricEngine error : Error Could not acquire lock for key 3#624#Point_AS_8815594_BM_X3_MR_MCAP_pF because: lock already exists↵ at c3.server.lock.DbLockMethods.couldNotAcquireLock(

whereas it does not throw this error when I try to load the data for the same metric using evalMetrics. Could someone please suggest what might be the issue?

I see this error only on QA environment and not on stage.


This is resolved. The reason I was getting this error is that I was trying to access the same table via two different commands. Since a table gets locked if some code is writing to it, the other one will throw this error.