Error: Failed to save item: <GUID> Item state has exceeded the 65,536 KB limit specified in core settings..
search cancel

Error: Failed to save item: <GUID> Item state has exceeded the 65,536 KB limit specified in core settings..

book

Article ID: 162082

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

During a replication cycle there is a series of three errors that occurs in the logs. If unattended the replication cycle will likely never complete successfully but continue to increment the run count.
The errors (excerpts) are as follows:

Error 1:

Source: Item.Save
Description: Failed to save item: <Guid>
Item state has exceeded the 65,536 KB limit specified in core settings: <Guid>
   [Altiris.NS.Exceptions.AeXException @ ]
 
Exception logged from:
   at Altiris.Diagnostics.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
   at Altiris.NS.ItemManagement.Item.GetItemStateXml(CodeProfiler cp)
   at Altiris.NS.ItemManagement.Item.Save()
   at Altiris.NS.ItemManagement.Item.Create(Guid productGuid)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.ReplicateEvents(ICollection`1 events, HierarchyReplicationDirection direction, Int32 maxHops, Guid node)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.OnSchedule(String identifier)
   at Altiris.NS.Scheduling.Schedule.Execute(CodeProfiler cpp, Guid guid)
   at Altiris.NS.Scheduling.Schedule.Execute(SecurityContext context, Guid guid)
   at Altiris.NS.Security.SecurityContext.ExecuteAsOwner(ICollection`1 itemGuids, Guid defaultTrustee, Action`2 action, Int32 severity, String message, String category)
   at Altiris.NS.Scheduling.Schedule.OnSchedule(String identifier)……
 
Error 2:

Source: Resource.SaveResourceToDatabase
Description: Item save to DB failed: <Guid>, (fromClone=False, user=NA\AltirisAdm)
Item state has exceeded the 262,144 KB limit specified in core settings: <Guid>
   [Altiris.NS.Exceptions.AeXException @ Altiris.NS]
   at Altiris.NS.ItemManagement.Item.GetItemStateXml(CodeProfiler cp)
   at Altiris.NS.ItemManagement.Item.Save()
 
Exception logged from:
   at Altiris.Diagnostics.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
   at Altiris.NS.ItemManagement.Item.Save()
   at Altiris.NS.ItemManagement.Item.Create(Guid productGuid)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.ReplicateEvents(ICollection`1 events, HierarchyReplicationDirection direction, Int32 maxHops, Guid node)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.OnSchedule(String identifier)
   at Altiris.NS.Scheduling.Schedule.Execute(CodeProfiler cpp, Guid guid)
   at Altiris.NS.Scheduling.Schedule.Execute(SecurityContext context, Guid guid)
   at Altiris.NS.Security.SecurityContext.ExecuteAsOwner(ICollection`1 itemGuids, Guid defaultTrustee, Action`2 action, Int32 severity, String message, String category)
   at Altiris.NS.Scheduling.Schedule.OnSchedule(String identifier)…….

Error 3:

Source: Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.OnSchedule
Description: Unable to batch process the Hierarchy events.
Item state has exceeded the 262,144 KB limit specified in core settings: <Guid>
   [Altiris.NS.Exceptions.AeXException @ Altiris.NS]
   at Altiris.NS.ItemManagement.Item.GetItemStateXml(CodeProfiler cp)
   at Altiris.NS.ItemManagement.Item.Save()
   at Altiris.NS.ItemManagement.Item.Create(Guid productGuid)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.ReplicateEvents(ICollection`1 events, HierarchyReplicationDirection direction, Int32 maxHops, Guid node)
   at Altiris.NS.Replication.Hierarchy.HierarchyEventProcessor.OnSchedule(String identifier)…….

Environment

ITMS 8.x

Cause

The GUID specified in the error does not exist in the database, but it's the proposed GUID of the Replication Manager is attempting to create.  There are two known causes for this error:

  1. There is an item with a very large “State” column in the database that needs to be exported and replicated, and the size of the data in the “State” column exceeds the default limit set in the following element in Coresettings.config:

         <customSetting key="ItemStateMaxSizeInKB" type="local" value="65536" />
     
  2. There are a lot of items, possibly orphaned through a manual cleanup of hung jobs—in the table HierarchyEvent, which cannot be processed.

Resolution

Suggestion #1:  Try doubling the setting for ItemStateMaxSizeInKB: 

<customSetting key="ItemStateMaxSizeInKB" type="local" value="131072" />

Suggestion #2:  Delete all entries from HierarchyEvent that do not exist in the ITEM table. The following script can be used:

delete e
from HierarchyEvent e
left join Item i on i.Guid = e.Event
where i.Guid is null
 
If the script above does not work, or deletes few or no rows then, as a last resort, truncate the table using the following:
 
Truncate table HierarchyEvent

Note:  Before externally modifying the database it is recommended that a current backup of the database is captured just in case there are problems though the suggestions above pose little risk.