Slow Reponse of ArcGIS Portal

5904
18
01-03-2018 08:31 PM
MatsHardy
Occasional Contributor

I have isntalled a Portal server 10.5.1 and web adaptor (IIS) 10.5.1 in single machine environment. The web adaptor is configured to access the Portal. I have also implemented IWA on Portal.

The porblem is that the performance of Portal is slow after setting up IWA. It takes nearly 2 minutes to open a map application, which has only a basemap layer, a point layer and few buttons e.g. measure distance, filtering. Anyone have ideas? Thanks.

0 Kudos
18 Replies
PanagiotisPapadopoulos
Esri Regular Contributor

try to determine where is the problem

  • try to access the rest service from web adaptor and see the performance

https://<server name>/<webadaptor name for server>/rest/services

  • also the same from arcgis server direct

https://<arcgis server name>:6443/arcgis/rest/services

they have the same speed?

MatsHardy
Occasional Contributor

The speeds are nearly the same.

For further investigation, I have switched the log level to debug and found that the messages "Token is not a valid Admin token" and "ARCGIS_PORTAL_TOKEN Authentication, Unable to validate token" are shown repeatedly.

<Msg time="2018-01-25T10:58:43,567" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = JXos1mNKH_DCwIK49Z9muYxwv2CHvJ2cB169OWprM4tTmL5A-qfwxWqQ6zsclx7cCG05KiCJmt3K1A0H3HUBryH2vUvtCdi_hseAbMveRIcvjNj29U805ZJGp3K9c3ewFerpYkoM1yEwf7ieob-nLQ.., referrer = http://www.arcgis.comCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:43,983" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = JXos1mNKH_DCwIK49Z9muYxwv2CHvJ2cB169OWprM4tTmL5A-qfwxWqQ6zsclx7cCG05KiCJmt3K1A0H3HUBryH2vUvtCdi_hseAbMveRIcvjNj29U805ZJGp3K9c3ewFerpYkoM1yEwf7ieob-nLQ.., referrer = http://www.arcgis.comCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:44,16" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = JXos1mNKH_DCwIK49Z9muYxwv2CHvJ2cB169OWprM4tTmL5A-qfwxWqQ6zsclx7cCG05KiCJmt3K1A0H3HUBryH2vUvtCdi_hseAbMveRIcvjNj29U805ZJGp3K9c3ewFerpYkoM1yEwf7ieob-nLQ.., referrer = http://www.arcgis.comCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In AdminSecurityPreHandler</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In AdminSecurityPreHandler</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Handler: InfoHandler</Msg>
<Msg time="2018-01-25T10:58:44,828" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Handler: InfoHandler</Msg>
<Msg time="2018-01-25T10:58:44,836" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Time (ms): 8 (/arcgis/rest/info)</Msg>
<Msg time="2018-01-25T10:58:44,836" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Time (ms): 8 (/arcgis/rest/info)</Msg>
<Msg time="2018-01-25T10:58:45,252" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = qU9bXxy8QcxtJuJ_AaBEqJFG8FThWzZt6kXl4lRN_AhE1OnI2Vaz6josWlElGv-MCz4PAhhcvFc2EPb9_2R783HuTYEqzLXPBCPFNqFDEPQBLzoeia2KZ9Cq4d2DgoW4cqDcIc-_Bp3BjiHDw626T0LmqipMn2mwm1ep3TYvrIo., referrer = https://dgiswebdr.fehd.hksarg/arcgis/home/organization.htmlCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:45,839" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = qU9bXxy8QcxtJuJ_AaBEqJFG8FThWzZt6kXl4lRN_AhE1OnI2Vaz6josWlElGv-MCz4PAhhcvFc2EPb9_2R783HuTYEqzLXPBCPFNqFDEPQBLzoeia2KZ9Cq4d2DgoW4cqDcIc-_Bp3BjiHDw626T0LmqipMn2mwm1ep3TYvrIo., referrer = https://dgiswebdr.fehd.hksarg/arcgis/home/organization.htmlCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:46,117" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = qU9bXxy8QcxtJuJ_AaBEqJFG8FThWzZt6kXl4lRN_AhE1OnI2Vaz6josWlElGv-MCz4PAhhcvFc2EPb9_2R783HuTYEqzLXPBCPFNqFDEPQBLzoeia2KZ9Cq4d2DgoW4cqDcIc-_Bp3BjiHDw626T0LmqipMn2mwm1ep3TYvrIo., referrer = https://dgiswebdr.fehd.hksarg/arcgis/home/organization.htmlCould not decrypt token. Token may not be valid.</Msg>
<Msg time="2018-01-25T10:58:46,136" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">findItemsById: 677180c8-3df3-4fe9-be59-5f9c1a97778c</Msg>
<Msg time="2018-01-25T10:58:46,228" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:46,228" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:46,573" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">ARCGIS_PORTAL_TOKEN Authentication, Unable to validate token com.esri.arcgis.discovery.admin.security.AGSSecurityException: Server machine 'https://DGISWEBDRLRW2K8:7443/arcgis/sharing/rest/community/self' returned an error. 'Invalid token.'</Msg>
<Msg time="2018-01-25T10:58:46,582" type="INFO" code="9029" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="a6c0b1c2-04ff-4b3f-881e-43a6e96aa25e" elapsed="">Request user: a6c0b1c2-04ff-4b3f-881e-43a6e96aa25e, Service: System/PublishingToolsEx/GPServer</Msg>
<Msg time="2018-01-25T10:58:46,583" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In AdminSecurityPreHandler</Msg>
<Msg time="2018-01-25T10:58:46,573" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Request host: xxx.yyy.com</Msg>
<Msg time="2018-01-25T10:58:46,583" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In AdminSecurityPreHandler</Msg>
<Msg time="2018-01-25T10:58:46,573" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Request address: 10.65.90.72</Msg>
<Msg time="2018-01-25T10:58:47,353" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">ARCGIS_PORTAL_TOKEN Authentication, Unable to validate token com.esri.arcgis.discovery.admin.security.AGSSecurityException: Server machine 'https://DGISWEBDRLRW2K8:7443/arcgis/sharing/rest/community/self' returned an error. 'Invalid token.'</Msg>
<Msg time="2018-01-25T10:58:47,355" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Request host: xxx.yyy.com</Msg>
<Msg time="2018-01-25T10:58:47,356" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Request address: 10.65.90.72</Msg>
<Msg time="2018-01-25T10:58:47,898" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Admin token. Trying portal token next. Token = z5E-uAFEZV2aRRkGrAYiyajTjiw4zT1u1uutBf4VlsA8pFFu6oGJsb16rvEe919SdpRe4II06rLft7p09l6rOQLrSxNg45HhPEigW7OUxtX50Fj_IiVdwAA8Z5iDU316ojW12YtG01Tu0rDsgC6DhCsNLOfdNERx6GI-EfggPlo., referrer = http://www.esri.com/3EABCB33-5666-431C-AAE0-92CDE6D96FDDToken Expired.</Msg>
<Msg time="2018-01-25T10:58:48,244" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">Token is not a valid Portal token. Token = z5E-uAFEZV2aRRkGrAYiyajTjiw4zT1u1uutBf4VlsA8pFFu6oGJsb16rvEe919SdpRe4II06rLft7p09l6rOQLrSxNg45HhPEigW7OUxtX50Fj_IiVdwAA8Z5iDU316ojW12YtG01Tu0rDsgC6DhCsNLOfdNERx6GI-EfggPlo., referrer = http://www.esri.com/3EABCB33-5666-431C-AAE0-92CDE6D96FDD</Msg>
<Msg time="2018-01-25T10:58:48,249" type="DEBUG" code="9999" source="Admin" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">java.io.IOException: com.esri.arcgis.discovery.admin.security.InvalidTokenException: com.esri.arcgis.discovery.admin.security.AGSSecurityException: com.esri.arcgis.discovery.admin.security.AGSSecurityException: Server machine 'https://DGISWEBDRLRW2K8:7443/arcgis/sharing/rest/community/self' returned an error. 'Invalid token.'</Msg>
<Msg time="2018-01-25T10:58:48,435" type="DEBUG" code="9999" source="System/PublishingToolsEx.GPServer" process="3192" thread="20" methodName="" machine="xxx.yyy.com" user="" elapsed="">Posting response from worker thread.</Msg>
<Msg time="2018-01-25T10:58:48,449" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:48,449" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In RServlet</Msg>
<Msg time="2018-01-25T10:58:48,802" type="DEBUG" code="9999" source="Server" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">ARCGIS_PORTAL_TOKEN Authentication, Unable to validate token com.esri.arcgis.discovery.admin.security.AGSSecurityException: Server machine 'https://DGISWEBDRLRW2K8:7443/arcgis/sharing/rest/community/self' returned an error. 'Invalid token.'</Msg>
<Msg time="2018-01-25T10:58:48,808" type="INFO" code="9029" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="a6c0b1c2-04ff-4b3f-881e-43a6e96aa25e" elapsed="">Request user: a6c0b1c2-04ff-4b3f-881e-43a6e96aa25e, Service: System/PublishingToolsEx/GPServer</Msg>
<Msg time="2018-01-25T10:58:48,809" type="DEBUG" code="9999" source="Rest" process="4180" thread="14" methodName="" machine="xxx.yyy.com" user="" elapsed="">In AdminSecurityPreHandler</Msg>

Are there any hints on performance on these messages?

0 Kudos
MatsHardy
Occasional Contributor

Thanks, I have tried to call the rest API of map services from JS, the speed of map display is normal.

My client has just sent me the request logs of the map app, it seems that the ArcGIS JS API is the problem. It takes long time (> 40s) to load esri.css, ResizeHandle.css, etc.

PanagiotisPapadopoulos
Esri Regular Contributor

you can try use the JS API from ESRI

0 Kudos
MatsHardy
Occasional Contributor

I have found that it only takes 20-30s to open the map app after IWA is removed. There is performance drag after setting up IWA. Are there any ways to improve the performance of IWA? Thanks.

0 Kudos
GISSupport3
Occasional Contributor III

Each base map tile requires authentication.

Can have lots of tiles 

We have set up an anonymous web adapter to access base maps.

Token authentication MAY help and haven't checked.

0 Kudos
MatsHardy
Occasional Contributor

Thanks for your reply, but my client requires authentication on map services. The map app is created by WebAppBuilder, can token authentication be applied to WebAppBuilder?

Besides, the map app loads slowly at first time but faster at later loads.

0 Kudos
GISSupport3
Occasional Contributor III

You could (technically) serve basemaps anonymously and all other services via IWA.

I just re-read the thread. May be best to focus on the initial slow JS load time.

Later, faster loads, will be due to caching.

Authentication is set at the Portal / Server setup.

0 Kudos
MatsHardy
Occasional Contributor

Thanks. About the slow JS load time, the only debug tool I know is IE developer tool. Are there any tool available for debugging?

0 Kudos