AnsweredAssumed Answered

Calculate API broke on large number of features

Question asked by YShi-esristaff Employee on Oct 4, 2018

So the question is : how to update all features's field in a large dataset with a value/expression?


I have a feature layer with >98,000 features, when I tried to use the calculate API


for e.g.: 

{where: CustomID IN (2379,2380,2382,2383,2385,2386,2387,2388,2389,2390,2391,2394,2395,2396,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2423,2424,2425,2426,2427,2428,2429,2430,2432,2433,...), [> 1000 features]

calcExpression: [{"field":'SuitabilityScore',"sqlExpression":'0.9'}]






calcExpression: [{"field":'SuitabilityScore',"sqlExpression":'0.9'}]



error appears as:


{"error":{"code":400,"message":"Unable to calculate fields.","details":["Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.  This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=1; handshake=42; [Login] initialization=0; authentication=0; [Post-Login] complete=0;  "]}}


and it will not update any records, the timeout is not a constant duration, usually between 30-50s


But when I go for a really small count of features, the calculate API will work fine:



Anyone knows what happens and help solve it? Thanks!