Issue
Sometimes the following error is logged when you’re migrating to the Office 365 environment:

ProcessFailedResult|Error while ingesting Item with Id [00092118-d38b-8e60-1f0f-b1013fc09d51]
ItemRoutingId: [212573255] Error: [System.ApplicationException:
An internal server error occurred. The operation failed., Cannot save changes made to an item to store.]

The issue is related to the target mailbox itself and is telling us that we cannot save changes made to an item and store them on the target. This may happen when the maximum number of items in the folder is exceeded. The Microsoft article below provides more details regarding such restrictions. One of them says “maximum 1000000 item per folder is allowed”.
Microsoft article
https://technet.microsoft.com/en-us/library/exchange-online-limits.aspx
How to do it
Archive Shuttle can split such folders and distribute a huge number of items between several folders.
Go to Configuration > System Configuration > General System Settings > Split threshold folderless items > set (for example, value 100000 or other value below 1000000).
Then, go to Configuration > System Configuration > General System Settings > Split threshold large folders (except journal / folderless) > set (for example, value 100000 or value below 1000000).

SQL to use
An investigation can speed up following SQL query showing the number of items per folder for specific mapping.

SQL:
 --item count per folder path
 SET NOCOUNT ON
 DECLARE @mappingid int
 set @mappingid = 19162 --put your Mapping ID here
DECLARE Links CURSOR FOR select LinkId from [LinkDatabaseConnection]
 declare @linkid uniqueidentifier
 declare @sql nvarchar(1000)
OPEN Links;
 FETCH NEXT FROM Links INTO @linkid
 WHILE @@FETCH_STATUS = 0
    BEGIN
       print 'link ID ' + cast(@linkid as varchar(255));
          Set @SQL = 'Use [ArchiveShuttleItem_' + cast(@linkid as varchar(255)) + '];
          select a.ContainerMappingId, count(a.ItemId) as cnt, c.[Path] from [ItemRouting] a
          left outer join [Item] b on a.ItemId = b.ItemId
          left outer join [StoragePath] c on b.StoragePathId = c.StoragePathId
          where a.ContainerMappingId = ''' + cast(@mappingid as varchar(255)) + '''
          group by a.ContainerMappingId, c.[Path]
          order by cnt desc'
          exec sp_ExecuteSQL @sql
       print '---------------------------';
       FETCH NEXT FROM Links INTO @linkid
    END;
 CLOSE Links;
 DEALLOCATE Links;
Print Friendly, PDF & Email