Delayed Email or Message Rescans with BES 5 and Exchange 2010

 

I recently ran into an issue where users were reporting that messages to their Blackberry handhelds were being delivered in clumps, and were also extremely delayed.  These are symptoms of a Blackberry Server rescan.  We were running BES 5.0.2 and Exchange 2010 SP1.  We upgraded the BES to 5.0.2 MR4, but the issue remained.

This essentially means that the BES server cannot keep up with email delivery, and thus cannot deliver the emails as they arrive.  It is forced to queue them, and deliver them in chunks.

I had already configured the Exchange 2010 throttling policy as per Blackberry’s documentation:

BES 5 and Exchange 2010 Throttling Policy

So throttling wasn’t the issue.  The issue ended up being that the BES server was only creating one mailbox agent in the BES server.  This has to do with the DAG model in Exchange 2010, and the way around it is to create static mailbox agents for EVERY user, or force the BES server to create multiple mailbox agents.  We can do this with two registry keys.  The first one:

HKLM\Software\Research In Motion\Blackberry Enterprise Server\Dispatcher

If it is not there, create a DWORD named MaxUsersPerAgent and set the decimal value to the maximum number of users per agent, in my case 40 users:

Untitled

The second registry edit is:

HKLM\Software\Research In Motion\Blackberry Enterprise Server\Agents

If it is not there, create a new DWORD with the name MaxMailboxesPerSession and set the decimal value to the value that you want the maximum number of mailboxes to be piped through a single MAPI session.  This is separate from the agent above.  For instance, I set mine to 35, which means at the 36th mailbox, the BES will create a new MAPI session.

Untitled2

After you make those changes, restart your BES server.  After making the above changes, your performance should increase, and you should see extra instances of the BlackberryAgent.exe process:

image

Just an FYI, SQL Express and MSDE are limited to five agents on the server.  For more agents, you will need to be using SQL Standard or higher, and edit the key:

HKLM\Software\Research In Motion\Blackberry Enterprise Server\Agents\NumAgents and change its decimal value to a number higher than 5:

Untitled3

Again, this value will be ignored higher than a value of 5 on SQL Express and MSDE.  If you have 1000 users, and you set the MaxUsersPerAgent value to be 40 as above, your agent breakdown will be as follows:

BlackberryAgent (1) = 40 Users

BlackberryAgent (2) = 40 Users

BlackberryAgent (3) = 40 Users

BlackberryAgent (4) = 40 Users

BlackberryAgent (5) = 840 Users

So be careful to set the MaxUsersPerAgent value appropriately for your environment if your limited to the number of agents.

As for the BES server itself, we saw slightly higher memory utilization due to the extra agents (around 400 MB), but much lower CPU usage.

Hope you guys find this helpful!

Advertisements
This entry was posted in Blackberry, Exchange 2010 and tagged , . Bookmark the permalink.

4 Responses to Delayed Email or Message Rescans with BES 5 and Exchange 2010

  1. Pingback: BES 5.0.2 and Exchange 2010 SP1 slow email delivery - Page 15

  2. Dave says:

    Thanks for the post! How long did it take for the additional agents to start up? We are having this exact issue with 178 BES users… So I created the keys above to limit it to 50 users per agent

  3. Dan says:

    Are you sure this is HKLM? I don’t even have a Research In Motion entry under software. Or is this under HKCU?

    Thanks!

  4. Toni Van Remortel says:

    For those running on a 64-bit OS: Look for HKLM/SOFTWARE/Wow6432Node/Research In Motion/BlackBerry Enterprise Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s