When you try to send more than 250 messages or 100 attachments by using a batch or script, the messages or attachments may not be sent, and events that are similar to the following may be logged in the application event log:
Event Type: Error Event Source: MSExchangeIS Event Category: General Event ID: 9646 Date: Date Time: Time User: N/A Computer: Servername Description: Closing Mapi session "/o=First Organization/ou=First Administrative Group/cn=Recipients/cn=XY" because it exceeded the maximum of 250 objects of type "objtMessage".
Event Type: Error Event Source: MSExchangeIS Event Category: General Event ID: 9646 Date: Date Time: Time User: N/A Computer: Servername Description: Closing Mapi session "/o=First Organization/ou=First Administrative Group/cn=Recipients/cn=XY" because it exceeded the maximum of 100 objects of type "objtAttachment".
This issue occurs because of a limit on the number of items that clients can open. By default, this limit is set to 100 for attachments and 250 for messages.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Important If you increase the MaxObjsPerMapiSession value, it can have a significant performance affect on the Microsoft Exchange server. Specifically, if the batch file or the script that you used to send the messages or the attachments does not correctly close out MAPI sessions, no clients can log on to the Exchange server if you have increased the MaxObjsPerMapiSession value. We recommend that you correct the batch file or the script instead of changing the MaxObjsPerMapiSession value.
Note Microsoft Exchange Server 2003 Service Pack 1 (SP1) increases the default values of the object types that are listed in the "More Information" section. This behavior is referenced in the following Microsoft Knowledge Base article:
830829 Your Exchange Server 2003 computer may stop responding after a MAPI client opens more than the default value of certain server objects
To resolve this issue, follow these steps:
On the Exchange 2003 computer, click Start, click Run, type regedit in the Open box, and then click OK.
On the Edit menu, point to New, and then click Key.
Type MaxObjsPerMapiSession, and then press ENTER.
For each object type that is listed in the event ID 9646 message (in the "Symptoms" section of this article, the example object types are objtMessage and objtAttachment), follow these steps:
On the Edit menu, point to New, and then click DWORD Value.
Type the object name (for example, type objtMessage), and then press ENTER.
Press ENTER again to open the Edit DWORD Value dialog box, type 500 in the Value data box, and then click OK.
Close Registry Editor.
If the problem persists after you have applied Exchange Server 2003 SP1 to the computer that is running Exchange, determine which item from the following list is causing these items to remain open in the client:
An Outlook add-in
A script or batch file
To determine what user or set of users may be reaching this upper limit, follow these steps:
Click Start, point to All Programs, point to Microsoft Exchange, and then click System Manager.
If Administrative Groups is listed, expand Administrative Groups, and then expand First Administrative Group. If Administrative Groups does not appear, go to step 3.
Expand Servers, expand your Exchange computer, expand First Administrative Group, and then expand Mailbox Store.
Click Logons, click the View menu, and then click Add/Remove Columns.
In the Available columns dialog box, click Open Messages, and then click Add.
In the Available columns dialog box, click Open Attachments, click Add, and then click OK.
Click Logons, click the Action menu, click Export list, type the name of the Mailbox Store in the Save As dialog box, and then click Text (Comma Delimited)(*.csv) and Save in the Save as type drop-down box.
Repeat this process for each Mailbox Store.
After the data is collected, follow these steps:
Open the files in Microsoft Excel.
Sort each column.
Then, compare each column with the default values that are listed in Knowledge Base article 830829. If any user is reaching these limits, we recommend that you visit that user's computer to determine what the user may be doing to cause these objects to remain open.
As mentioned previously, this problem may be caused by a program that integrates with Outlook, with an Outlook add-in, or with a batch file or script that is running against the mailbox.
As a further troubleshooting step, remove or disable any third-party Outlook add-in and antivirus software on the client computer. Then, verify the results of the server again to ensure that these objects are no longer open.
The following objects are typical objects that you may see in event ID 9646 messages: