Share the Knowledge
RSS icon Home icon
  • Exchange 2007: Mapi session exceeded the maximum of 32 objects of type “session”

    Posted on February 13th, 2008 webmaster 16 comments         Print Print

    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 
    3. Open Tcpview.exe on the server. Sort it by Remote Address, then sort it by Process.
    4. 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)
    5. 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.
     

    15 responses to “Exchange 2007: Mapi session exceeded the maximum of 32 objects of type “session”” RSS icon

    • Thanks a lot !

      We’ve got this problem with a client and it’s fix the problem !

    • I can confirm that this works. This is a workaround, of course, and does not solve the problem of loosing connectivity.

    • This saved my a$$ I don’t know who you are but thank you thank you thank you for sharing this information. I don’t know what I would have done except reboot my exchange server in the middle of the day (not a very good choice) and kick of everyone just because one user could not conenct.

      Awesome post!!!!

    • You’re welcome, glad I was able to help :) . Btw, we haven’t had this issue ever since we installed Exchange Server 2007 SP1 and Update Rollup 1 back in March. We used to get about 1-3 cases of this every week.

    • Great! Thank you very much!
      I always wanted to write in my site something like that. Can I take part of your post to my blog?
      Of course, I will add backlink?

      Sincerely, Timur Alhimenkov

    • Timur,

      Yes, please feel free to do so :)

    • Thanks, this was very helpful. In my case, the user went over their allotment of connections because he was on a laptop which was periodically connecting to a wireless access point not on our network, which would disconnect him from the Exchange server.

      I had trouble closing the connections with TCPView until I realized I had to right-click the .exe and Run as Administrator.

    • Thanks for this post. I had this problem for this first time today because of a flakey WIFI connection and am back up and running within mintues.

    • Your resolution saved the day for me! Thanks for posting such useful info!

    • Thank you man for the great post, i couldn’t find anything useful on Microsoft site.

      Thank you Man

    • Guy’s it is all good but you still have the problem.
      If you have 10000 you are not going to do it on daily basis.
      You should do some registry tweaking and forget about this .
      See here http://www.kreslavsky.com/2008/06/outlook-status-shows-disconnected.html

      6. In order to Increase default 32 MAPI connections limit do the following things

      a. Click Start, click Run, type regedit in the Open box, and then click OK.

      Locate and then click the following registry sub key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem

      If the Maximum Allowed Sessions Per User entry does not exist, do the following:

      On the Edit menu, point to New, and then click DWORD Value.

      Type Maximum Allowed Sessions Per User as the entry name, and then press ENTER.

      Right-click the Maximum Allowed Sessions Per User entry, and then click Modify

      Click decimal, type the value that you want to set in the Value data box, and then click OK.

      Exit Registry Editor.

      Click Start, click Run, type services.msc in the Open box, and then click OK.

      Click the MSExchange Information Store service, and then click Restart Service.

    • Thanks for the tip, Anton!

    • I’ve changed the TCP KeepAliveTime which fixed this for me – i changed it to one hour

    • Thanks for the tip Think Property! I also noticed you have a New Zealand domain, planning on going there late this year, can’t wait! :D

    • Outlook client doesn’t update folders automatically. On the status bar instead of “All folders are up to date” message “This folder was last updated on …” is displayed.

      Your Microsoft Exchange 2010 server logs the following error:

      Event ID: 9646
      Type: Error
      Source: MSExchangeIS
      Description:
      Mapi session “/o=First Organization/ou=Administrative Group/cn=Recipients/cn=user”
      exceeded the maximum of 500 objects of type “objtFolder”.
      The number of server-side objects that are allowed by clients is limited to prevent a single client from the exhausting resources on the Exchange server.

      To resolve this problem:

      1. Open Registry Editor and navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchangeIS
      2. Right click ParametersSystem and create New -> Key

      3. Enter MaxObjsPerMapiSession and confirm creation of the new sub-key

      4. Right click newly created key, create new DWORD value called objtFolder and give it a decimal value bigger than default 500.

      5. Create another DWORD value called objtFolderView and give it the same value.

      There’s no need to restart Exchange server or even MSExchangeIS service. Give it some time and things will settle down. You might need to restart Outlook client to start synchronising folders again

      Semih SOYKAL


    1 Trackbacks / Pingbacks

    Leave a reply