Exchange 2007: Mapi session exceeded the maximum of 32 objects of type “session”

Error Message: “Mapi session “/o=Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=JohnSmith” exceeded the maximum of 32 objects of type “session””.
Source: MSExchangeIS
Event ID: 9646

On the client side, the user is unable to connect to Microsoft Exchange or getting this error:

Unable to open your default e-mail folders. The Microsoft Exchange Server computer is not available. Either there are network problems or the Microsoft Exchange Server is down for maintenance.

This usually happens when the user loses network connectivity while Outlook is still open. The Exchange server wasn’t able to close the sessions properly so they just stayed there even when they are not in use.

By default, Exchange only allows up to 32 MAPI (Outlook) sessions per user. To fix this problem, you must close some of the sessions.

What to do:

  1. Download and extract Sysinternals’ TCPView (free) on the Exchange server
  2. Open the Exchange Management Shell and type in the following command to get a list of all the opened sessions. Make a note of the IP Addresses:

Get-LogonStatistics jsmith | Sort-Object clientipaddress | Format-Table username,clientipaddress,logontime

  1. Open Tcpview.exe on the server. Sort it by Remote Address, then sort it by Process.
  2. Look for the IP Addresses from Step 2 in the Remote Address column (if you only see hostnames, go to Options -> uncheck Resolve Addresses) and close their connections for the store.exe process (right-click and choose Close Connection, you can select multiple connections by holding the Shift or Ctrl key)
  3. Run the command from Step 2 again and you will see that the sessions disappeared. The user should now be able to connect to the Exchange server again.

Autodiscover Service Exchange 2007

For Autodiscover, you actually have two options.

1. Repeat the above process, with a new dedicated web site for autodiscover.
The command for a new Autodiscover virtual directory is

New-AutodiscoverVirtualDirectory -Websitename Autodiscover -BasicAuthentication:$true -WindowsAuthentication:$true

That web site can then get its own SSL certificate.
This could be useful if you use two different domains, one for email and one for external facing web services. Autodiscover uses the same domain as your email.
However if you have multiple domains for email, you will need to use the redirect method.
2. Add to the external web site and configure a redirect.

To add the Autodiscover virtual directory to the External web site created in above:

New-AutodiscoverVirtualDirectory -Websitename External -BasicAuthentication:$true -WindowsAuthentication:$true

The redirection configuration is very important to ensure that it works correctly. The redirection method requires port 80 (http) traffic to come in. For internal traffic that is fine, but for external traffic you may want to look at a way of configuring the redirection using a public web site.

At the time of writing, this is Microsoft’s article on redirection. It is covered under the section Hosted Environments and the Autodiscover Service, but would also be useful if you have more than one domain, or you use a different domain for email than you do for external facing web services.

Exchange 2003 Disaster recovery

With a good backup in hand and Exchange databases and logfiles on different hard drives, it is no problem to recover from an Exchange disaster.Just restore the data from backup and initiate a roll forward of the transaction logs. Well done, the Exchange information store goes online.

But what should you do when your backup isn’t readable or you don’t have a backup? Here’s how these tools come to play.

Before you start:

  • Make sure that the databases are really not startable
  • Check the Application log for Exchange events that can tell you the cause of the failure
  • Make a backup of the database
  • Restart the server so that a soft recovery can be done

ESEUTIL /P parameters

ESEUTIL /p repairs a corrupted or damaged database. Ensure that you have a minimum of 20% free disc capacity in association to the Exchange database size.


Figure 9: ESEUTIL repair modus

Example:

ESEUTIL /P „c:\program files\exchsrvr\mdbdata\priv1.edb“ /Se:\exchsrvr\mdbdata\priv1.stm /Te:\tempdb.edb

This command will repair the database PRIV1.EDB. If you have no .STM file, you can create one with ESEUTIL /CREATESTM. Read more about this here.

After running ESEUTIL, you can open a detailled logfile called >database<.integ.raw to see the results.

As a last Step run ISINTEG –fix -test alltests. You can read more about ISINTEG later in this article.

Note: Sometimes you must run the fix over and over again till it fix all problems. Its like a defrag of a harddrive

Source: http://www.msexchange.org/tutorials/Exchange-ISINTEG-ESEUTIL.html