Languages

iOS: How to mitigate a full sync or reload of Exchange account data

Symptoms

The Exchange email, calendar, or contact data on your iOS device may reload unexpectedly. Often the cause of this is a series of HTTP 500 errors received by the iOS device in response to the client's ActiveSync requests. Learn how to troubleshoot this issue.

Resolution

Your iOS device may fully reload Exchange data unexpectedly if it sees multiple HTTP 500 errors. 

A 500 error is an HTTP server status code indicating that something has gone wrong on the server while processing your request, but there isn't enough information to explain why. iOS sees multiple 500 errors as an indication that something's wrong with the server and that the validity of data it previously cached is suspect. The next time the client is able to connect to the server, iOS attempts to request all of the calendar, contacts, email, or note data—depending on what it received 500 errors against—to replace the iOS client's local cache.

How to determine if the device is receiving an HTTP 500 error

The ActiveSync logs will record the type of error the device is receiving. You will see something like the following in the report:

Event Type: Error
Event Source: Server ActiveSync
Computer: Server
Description: Unexpected Exchange mailbox Server error: Server: [myserver.company.com] User: [user@company.com] HTTP status code: [500]. Verify that the Exchange mailbox Server is working correctly.

You may find the application Log Parser Studio useful in identifying the HTTP errors.

Apple Product Engineering is investigating the reload frequency.

Mitigation

The following steps can mitigate some of the full reloads of the Exchange account data:

  1. Have your Exchange Server admin set the server's heartbeat interval to 59 minutes. The heartbeat interval is how much time that iOS calculates should pass between pings to the server. Instructions on setting the heartbeat interval are in the More Information section of this Microsoft Knowledge Base article.
  2. Have your IT staff confirm all network firewalls are set to timeout at 30 minutes or longer. The default timeout for some devices may be as low as five minutes.
  3. Change the following settings on the iOS device to decrease the amount of data that sync to the device:
    • Reduce the number of Mail Days to Sync
    • Reduce the Sync Calendar Events timeframe
    • Reduce the frequency for data to be automatically fetched or pushed to the device from the server

Additional Information

When using Push notifications, iOS by default receives a notice from the server when there is a change to your Exchange Inbox. Upon receipt, the client will then request the new information. ActiveSync also allows a client to indicate which additional folders it wants to monitor by piggybacking on ActiveSync's ping mechanism. These ping updates are transmitted through numerous networking devices sitting between the iOS device and the Exchange Server (such as firewalls, proxies, load balancers, Hub Transport Server, IIS Server, and so on) that can affect the timing of these packets. This article refers to all of these servers as intermediate servers.

An HTTP 500 error is usually returned to the iOS device by the intermediate servers. The error typically occurs when an intermediate server either cannot communicate with the Exchange Server or Exchange's responses back to the intermediate servers are slower that expected. This can happen when Exchange is under heavy load and the Time to Live (HeartbeatTimeoutInterval) for a response expires. The HeartbeatTimeoutInterval (HBI) setting on the intermediate server is most likely set to an amount of time that is less than the ExchangeActiveSync HBI.

When the device initiates a sync, an Exchange ActiveSync HBI is set to the amount of time, in seconds, the device waits for a reply before trying again. For example, an HBI of 900 seconds is 15 minutes.

Usually the Exchange Server returns an acknowledgement of the client's sync request, along with any data changes pending for the device. If the Exchange Server is very busy or can't be reached by the intermediate servers, they should wait for the EAS HBI to expire before returning the 500 error.

When the iOS device receives a response with the HTTP 500 error, it reissues the sync request. If the response is another HTTP 500 error, the iOS device will attempt to request all of the data, whether calendar, email, contacts or notes, depending on the original sync request. For example, if the client attempted to sync the user's Exchange Calendar and receives two 500 errors in a row, iOS will ask Exchange to send down all of your calendar data the next time it can connect, so that it can replace its local cache of calendar data.

This document will be updated as more information becomes available.
Important: Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. Apple provides this only as a convenience to our users. Apple has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and Apple assumes no responsibility in this regard. Please understand that a third-party site is independent from Apple and that Apple has no control over the content on that website. Please contact the vendor for additional information.
Important: Information about products not manufactured by Apple is provided for information purposes only and does not constitute Apple’s recommendation or endorsement. Please contact the vendor for additional information.
Last Modified: Mar 11, 2013
Helpful?
Yes
No
Not helpful Somewhat helpful Helpful Very helpful Solved my problem
Print this page
  • Last Modified: Mar 11, 2013
  • Article: TS4511
  • Views:

    26722
  • Rating:
    • 59.0

    (178 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked