Urgent ArcServer mapservice issue

2111
21
Jump to solution
03-08-2019 07:52 AM
BillChappell
Occasional Contributor II

Hi,

We have an app that is having issues, and it looks like it's ArcServer but it could be a network issue. And I've scoured the internet for answers but an still stumped. The service draws fast from the endpoint when you tell it to preview or use the JS viewer. However, when querying right from the REST endpoint it's a pig, query all records and it seems to hang and die. Query 200 records and it runs fairly fast but slower then it should.  We are using the Esri-Leaflet API and It can be fast locally, but from outside the firewall it's slow and draws in patches before it stops, before it finishes.

Any ideas or clues?

Layer: streams (ID: 1)  endpoint 

ArcGIS API for JavaScript: WI_PWL2019  built-in JS viewer, from ArcServer Endpoint.  

https://pubgis.health.ny.gov/arcgis/rest/services/WI_PWL2019/MapServer/1/query?where=1%3D1&text=&obj...  200 records. 

https://pubgis.health.ny.gov/arcgis/rest/services/WI_PWL2019/MapServer/1/query?where=1%3D1&text=&obj...  All records..

ArcServer 10.6,, MS Server 2016, 16GB ram

Tags (1)
0 Kudos
21 Replies
BillChappell
Occasional Contributor II

Here is a sample page, I was using to test.

<html>
<head>
<meta charset=utf-8 />
<title>PubGIS Test</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />

<!-- Load Leaflet from CDN -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"
integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg=="
crossorigin=""></script>


<!-- Load Esri Leaflet from CDN -->
<script src="https://unpkg.com/esri-leaflet@2.2.3/dist/esri-leaflet.js"
integrity="sha512-YZ6b5bXRVwipfqul5krehD9qlbJzc6KOGXYsDjU9HHXW2gK57xmWl2gU6nAegiErAqFXhygKIsWPKbjLPXVb2g=="
crossorigin=""></script>


<style>
body { margin:0; padding:0; }
#map { position: absolute; top:0; bottom:0; right:0; left:0; }
</style>
</head>
<body>


<div id="map"></div>

<script type='text/javascript'>
var map = L.map('map').setView([42.682435, -75.290039], 7);

var str = L.esri.basemapLayer('Streets').addTo(map);

var streams = L.esri.featureLayer({
url:'https://pubgis.health.ny.gov/arcgis/rest/services/WI_PWL2019/MapServer/1',
//url:'https://services8.arcgis.com/k1v79LrnPTwysMSs/ArcGIS/rest/services/WI_PWL2019/FeatureServer/1',
useCors: false,
style: function (feature) {
var c,o = 0.75;
switch (feature.properties.WBCATGRY) {
case 'Impaired':
c = '#FF0000'; //red
break;
default:
c = '#0000FF'; //blue
}
return {color: c, opacity: o, weight: 2};
}
});

streams.bindPopup(function (layer) {
return L.Util.template('<p>PWL ID: {PWL_ID}<br>Name: {NAME}<br>Catgry: {WBCATGRY}</p>', layer.feature.properties);
});

streams.addTo(map);

var usastreams = L.esri.featureLayer({
url: 'https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Rivers_and_Streams/FeatureServer/0',
useCors: false,
where:"STATE='NY'",

style: function (feature) {
var o = 0.75;
var c = '#0000FF'; //blue
return {color: c, opacity: o, weight: 2};
}
});

usastreams.bindPopup(function (layer) {
return L.Util.template('<p>Name: {NAME}<br>State: {STATE}</p>', layer.feature.properties);
});

var baseMaps = {
"Streets":str
};

var overlayMaps = {
"pubGIS":streams,
"Esri_NY":usastreams
};
L.control.layers(baseMaps, overlayMaps,{collapsed:false}).addTo(map);
</script>

</body>
</html>

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

What are you doing that requires loading as a featureLayer instead of a dynamicMapLayer? 

Also, with the featureLayer, what about using zoom-dependent simplifyFactor?

0 Kudos
BillChappell
Occasional Contributor II

In the actual app simplifyfactor is set. The page I posted it wasn't. I overlooked it in that page as I needed a test page in ten minutes. As for why I'm handling a dynamic layer as a featurelayer? Basically to symbolize on unique values and control line size.  

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I don't code much with Esri Leaflet, but from past dabbling and the documentation, you can change symbology using a dynamicMapLayer and those layers perform much better than featureLayers.

0 Kudos
BillChappell
Occasional Contributor II

After a week of frustration, we noticed this worked well in ArcServer 10.3 and not in 10.6.1. We noticed the network packets would increase in size in 10.6 and were larger in 10.6. Moving around after a minute or so would crash the browser as it approached 2 GB. In 10.3, the browser memory did not increase and the packets were smaller. Running 2 servers, same data, save JS code, with the 2 different versions, showed us it was the ArcServer software. To confirm, we swapped software on the servers and it still showed it was the software.  Now were hoping 10.7 fixes it.

0 Kudos
RandallWilliams
Esri Regular Contributor

Hmmm...Are you performing these tests directly against the GIS Server (port 6443), or are you performing this test against the web tier? I ask because it almost sounds like the browser isn't caching the JSAPI like it should be, and pragma/nocache headers are defined at the web tier. Basically, I want to understand if we're actually testing apples to apples, as I haven't seen these issues on the various servers I run in house.

0 Kudos
BillChappell
Occasional Contributor II

Against the server. We have a dev, eval, and prod servers, all were tested in 10.6 and 10.3. The 10.6 had the issues on all 3 levels. Servers OS, Processors, and Ram identical, Same project produced data for the service. Same JavaScript code with the same settings in ArcServer's interface.  We have been in contact with Esri support, call is under NYS DOH. 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I won't be surprised if your issue relates to resultOffset and resultRecordCount parameters and exceededTransferLimit property.  The two parameters were introduced in 10.3 for dynamic map services, but the property wasn't introduced until 10.3.1.  The JavaScript code will behave different when exceededTransferLimit property exists or doesn't exist, is my guess, so I don't think the code is exactly the same between your two tests.

0 Kudos
BillChappell
Occasional Contributor II

I'm sorry it was actually 10.3.1 vs.10.6.1,  Esri actually has two support calls on this. In 10.6.1 the map when panned would slowly fill in data, and then it would stop. If you moved the map then it crashed, In the console you could see the packet size increase and the packets were about 12MB, in 10.3.1 it stayed fluid and packets were about 56kb. In 10.6.1 it seemed to accumulate the memory used until it crashed.  Tried Chrome, IE, Edge, it didn't make a difference.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Oh, just trying to make me look bad, huh.   I am interested to see what Esri comes back with.

0 Kudos