Share via


Problem with Warning 1040 Activesync

Question

Monday, November 18, 2019 10:07 PM

Hi,

From two weeks ago I started receiving warnings 1040 and ActiveSync:

"The average of the most recent heartbeat intervals [297] for request [Ping] used by clients is less than or equal to [540].
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.

For more information about how to configure firewall settings when using Exchange ActiveSync, see Microsoft Knowledge Base article 905013, "Enterprise Firewall Configuration for Exchange ActiveSync Direct Push Technology" (http://go.microsoft.com/fwlink/?linkid=3052&kbid=905013)."

Firstly we do not have any problems with ActiveSync on any mobile device. Everything is working fine.

I've done all these things:

- In file \Program Files\Microsoft\Exchange Server\ClientAccess\Sync, I've changed Mini and MaxHeartbeatInterval  to 0

- Changed the connection timeout in IIS to 30 mins for the default website

- modify the TCP Keep Alive Settings to 30min

Nothing has helped.

Then I've tried In file \Program Files\Microsoft\Exchange Server\ClientAccess\Sync, to reduce "HeartbeatAlertThreshold" from 540 to 250. But as soon as I've reduce this then ping has dropped from average 300 to 240 and I was again having Warning 1040. Then if I again decrease to 220 then average ping will drop below 220 and I'll still have Warning 1040.

We are using just standard Windows firewall and I do not see option how I can increase timeout on Windows firewall.

All these problems started two/three weeks ago. I'm not sure are they linked to recent upgrade from CU17 to CU23 or maybe some other windows update.

Thank you for your help

All replies (10)

Sunday, November 24, 2019 10:51 PM ✅Answered | 1 vote

I've found cause of this problem, it is Outlook iOS app. After removing Outlook from each phone this event stopped for few hours but then it has started again. After more digging up I've found that in each mailbox under mobile devices, in ECP, there was Outlook for iOS/Android, even that no devices were using outlook anymore. After blocking Outlook app I'm warning free for whole weekend.

One thing is really strange, if I delete Outlook in mobile devices for each mailbox, after some period of time again it will show up. Deleting again will no make any changes. That was reason why I've to denied access for Outlook app. If someone have idea how to permanently delete Outlook from mobile devices it would be great. And what is even more confusing how it is possible that this app showing for each mailbox even that I've checked all mobile devices including mine.


Monday, November 18, 2019 10:29 PM

Hi.

1. Maybe you have customize config before CU, and after CU can rewrite this file. Please check from backup or another CAS Server. 

2. Maybe you have Hardware Load Balance or Proxy Balance Farm? Maybe something update on this point?

3. Maybe you have BlackBerry? It's not support for BES. 

How the Direct Push Technology Works

Event Viewer Warning 1040- Active Sync Direct Push technology

MCITP, MCSE. Regards, Oleg


Monday, November 18, 2019 11:34 PM

Hi Oleg,

We have only one exchange server without and Hardware Load Balance or Proxy Balance Farm.

Also I've done CU upgrade more than 1 months ago, so it can't be linked only to CU upgrade but maybe combination CU and windows update (now I'm just guessing). As this problem has not started immediately after CU upgrade or windows update but by itself approximately 2 weeks ago.

We have only apple devices connected (iPhones and iPads).

I've already when through provided links and I didn't find any solution there. Thanks


Tuesday, November 19, 2019 1:17 AM

Update, I've checked when I upgraded to CU23 and it was 2 months ago. This problem is not linked to CU23 upgrade.


Tuesday, November 19, 2019 8:43 AM

Hi,

I would suggest you try to temporarily disable the firewall, then monitor for some time, whether is this event ID gone.

I think this event is caused by wrong configuration on firewall. Here are two related with thread:

Exchange 2010 ActiveSync Event-ID 1040 

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Event Id 1040 on Exchange Servers The best practice is to increase the firewall Time Out Values for HTTP requests to Exchange Servers Active Sync Virtual Directory.

This is a warning which will not effect the using of ActiveSync, I think you can ignore it directly.

Regards,

Kyle Xu

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, November 19, 2019 10:15 AM

Hi Kyle,

I'm not sure how it can be firewall settings, as I'm using standard windows firewall which I was using from the beginning and nothing has changed in firewall settings. Also I was not able to find any info how to increase timeout.

I've disabled firewall and I was still receiving same warning.

Regarding first link, I've already said if I reduce ”HeartbeatAlertThreshold” then somehow also average ping will drop below my new value and again will have same warning.

Regarding second link, that was already provided by Oleg and I was aware of it. Also I've said that I've tried with changing Mini and MaxHeartbeatInterval to 0 but that didn't help.

Thank you.


Friday, November 22, 2019 1:48 AM

Here is another update. I've done server restore on temp server and I've found that this error has started on 5th  November. I've updated to CU23 on 18th September. Windows updates have been installed on 18th September and then on 8th November. In mean time nothing has been changed on our server.

Only what I can conclude that something on outside world has changed what is causing this error. I'm wondering is it possible that it can be linked to mobile provider or mobile app? As for connecting to Exchange we are using either default iOS mail app or Outlook app.


Wednesday, December 11, 2019 7:32 AM

I agree with Mario Bura. The problem was cause by Outlook app.

In my research , I found Outlook app will ping Exchange Server about 3-4 mins (180-240 seconds).

But Exchange will warning 1040 when ping period below 540 seconds.

I also config my firewall 443 port timeout from 300 to 1800.


Thursday, December 12, 2019 6:31 AM

Thank you for confirming my assumption.


Thursday, December 19, 2019 7:08 PM

We are seeing the same thing, and it has gotten worse as more Outlook app devices are switching to the 180 second HeartbeatInterval. I'm hopeful Microsoft will release guidance on this change -- the Outlook App support team seems unaware or unable to offer assistance on this, and a ticket I opened under our Exchange 2016 Server enterprise support has not provided any relief. For now we have reduced the HeartbeatAlertThreshold as there seems to be no real issue other than conflicting defaults.