Troubleshooting map service performance with server logs
Fine-grained logging down to the layer draw level is available through the logging level Verbose. The detailed logging is especially helpful when troubleshooting performance. In this topic, consider the scenario that you have a map service that's not drawing as fast as you'd like.
When you need more detail about what's happening during a map draw, you can go to the Logs module in ArcGIS Server Manager, enable logging at the Verbose level, make a request to the map service, and view the resulting log. To do so, follow these steps.
- Open Manager and log in. If you need help with this step, see Logging in to Manager.
- Click Logs > View Logs > Settings.
- Set the log level to Verbose. Click Save.
- In a client application, make a simple request to your map service by panning or zooming. Note the current time so you can easily pinpoint the request in the log.
- In Manager, click Logs > View Logs.
- In the log Level drop-down list, select Verbose.
- In the Source drop-down list, choose your map service. It will be listed as ServiceName.MapServer.
Click Query.
- Examine the log that was created during your request and note the feature count and elapsed draw time of each layer. For this step, sometimes it's helpful to print the log and use a highlighter pen to note the draw times. You can do this by clicking Printer Friendly View in the View Logs module. You'll immediately see which layers are taking the longest to draw. Also, keep an eye on the feature count to spot inefficient layers. A layer may take only 0.2 seconds to draw at a particular extent, but if the extent only includes two features, you may have a potential inefficiency.
- Repeat this process at several different locations and scales in your map. You want to make sure you analyze a good sample of the symbology and layers in your map.
- When you finish, set the log level back to Warning.
The topic Map service log codes contains a table of the codes you'll see when analyzing the detailed logging. If you scroll down the topic, you'll also find an example of the codes returned from a simple ExportMapImage request like the one that occurs when you pan or zoom the map.
When examining detailed logs, you'll often see the messages Beginning of layer draw and End of layer draw. The time between the beginning and the end of the layer draw is the time that the request spends in the GIS server tier. If you determine that performance is acceptable in the GIS server tier but your application is still slow, it's possible that your web server is the bottleneck or that your application is spending time waiting for available service instances so it can draw the layer.
To learn more about troubleshooting the server with logs, see About server logs.