Dealing with Event ID 1040 MS Exchange ActiveSync
A regular occurrence in our Exchange 2007 Server has been Event ID 1040 with Source MSExchange ActiveSync, the event appears approximately every fifteen minutes.
The event tells us:
Event Type: Warning
Event Source: MSExchange ActiveSync
Event Category: Requests
Event ID: 1040
The average of the most recent  heartbeat intervals used by clients is less than or equal to .
Make sure that your firewall configuration is set to work correctly with Exchange ActiveSync and Direct Push technology. Specifically, make sure that your firewall is configured so that requests to Exchange ActiveSync do not expire before they have the opportunity to be processed.
The event details recommends visiting Microsoft Help and Support specifically http://support.microsoft.com/?&kbid=905013 which explains the issue may be firewall related, in particular “…firewall has not been configured to let HTTP(S) requests live longer than the minimum heartbeat interval“. The default setting is 9 minutes (540 seconds).
To address this we upped our firewall timeout for this particular connection to 30 minutes however the problem still occurred. We are currently working with our firewall vendor on this issue and will keep you posted.