Select to view content in your preferred language

Max Record Count Not Retaining Change

238
2
02-09-2026 07:40 AM
FlightDeck
Frequent Contributor

Hey All,

I recently posted a new Web Experience Map for some internal employees. This map has 2 layers, both consisting completely of polylines. Each Feature has 500K polylines. when I open the map in a browser it only partially loads. If I zoom in on an are that has not loaded it will then display the lines that previously were not rendered, but as soon as I zoom out it returns to not loading that area. From poking around, I gather this may be caused by the Max Record Count being set too low. Currently 2000. I have gone into the REST page for one of the features, opened the admin page. clicked the update option at the bottom and entered 

{"maxRecordCount": 4000}

Selected JSON from the drop down and clicked Update Definition I am then presented with a black page that reads 

{
 "success": true
}

 When I return to the REST page the Max Record Count is still 2000 and the layer on the Web Experience map loads exactly the same. 

Have I done something incorrect? Is there a better way to solve the issue rather than adjusting Max Record Count?

0 Kudos
2 Replies
DavidColey
MVP Frequent Contributor

Yeah making that change as a Rest api update from the admin page is essentially the same as using the arcgis api for python where you go in and update a value for a feature layer using an update dictionary:

updateDict = {'maxRecordCount': 4000, 'capabilities': 'Query,Extract'}

portFL = FeatureLayerCollection.fromitem(portItem)
print (portItem.title)
portFL.manager.update_definition(updateDict)

https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#arcgis.featu...

setting the value here doesn't change anything, it has to be set when the service or feature layer is published. Then if the service is overwritten by say the arcpy sharing module for featureSharing draft:

sddraft.maxRecordCount = 4000

https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/featuresharingdraft-class.htm

it is very frustrating that the 'update definition' does nothing - updating the feature layer definition will change the maxRecordCount for a hosted feature service in 3 places - but not for the feature service portion itself.

Anyone can feel free to correct me.

0 Kudos
FlightDeck
Frequent Contributor

Thank you, Not sure I 100% understand but I think I understand the gist. Is there a step by step guide or video that details how to go about this properly? Is there a better way to get Experience Builder to render more of a layer without changing the Max Record Count?

0 Kudos