- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Suite Known Issues
- :
- Known Issue: Batch job to delete obsolete inventory may fail with timeout if there is a large volume...
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Known Issue: Batch job to delete obsolete inventory may fail with timeout if there is a large volume of data to be deleted (IOJ-2253591)
Known Issue: Batch job to delete obsolete inventory may fail with timeout if there is a large volume of data to be deleted (IOJ-2253591)
Summary
After enabling settings to delete obsolete inventory in the Obsolete inventory section of the Inventory tab on the System Settings page, the batch process that runs to delete the inventory may fail with a timeout if there is a large volume of data to delete. When this occurs, obsolete inventory data will not be removed as expected.
Details
This issue occurs because deleting a large volume of inventory data can take longer than 1 hour, which is the timeout allowed by the batch process that performs this operation.
Executing the following query against the compliance database (for FlexNet Manager Suite systems) will show details of the last 10 executions of the process to delete obsolete inventory:
SELECT TOP 10 Output, StartTime, FinishTime, Progress, ReturnCode FROM BatchProcessExecution WHERE BatchProcessTypeID = 46 /* IMTenantObsoleteInventoryMaintenance */ ORDER BY StartTime DESC
When this issue occurs, Output message values returned by the above query will show the following:
CleanObsoleteInventoryData failed. Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Workaround
Flexera One IT Asset Management customers should contact Flexera Support for assistance if this issue occurs.
FlexNet Manager Suite customers can execute the following SQL script against the inventory database using a tool like SQL Management Studio. Change the number of days on the first line based on how long you plan to keep obsolete inventory data for.
DECLARE @ObsoleteInventoryPeriodInDays INT = 30 DECLARE @staleDate DATETIME = DATEADD(day, -@ObsoleteInventoryPeriodInDays, DATEDIFF(Day, 0, GetDate())) DECLARE @BatchSize INT = 10 CREATE TABLE #Computer (ComputerID BIGINT) WHILE 1 = 1 BEGIN INSERT INTO #Computer SELECT TOP (@BatchSize) c.ComputerID FROM dbo.Computer c INNER JOIN dbo.InventoryReport ir ON c.ComputerID = ir.ComputerID WHERE ir.HWDate < @staleDate BEGIN TRANSACTION IF EXISTS(SELECT 1 from #Computer ) EXEC DeleteComputers COMMIT TRANSACTION DELETE FROM #Computer IF @@ROWCOUNT < @BatchSize BREAK END DROP TABLE #Computer
This script may run for a long time, but will continue to make progress as it continues to run. It will delete a small number of computers at a time.
If this script terminates with a timeout, deadlock or other other error of a transient nature, keep repeating executions of the script until it no longer times out: the script will continue to make progress deleting records, even if transient errors occur from time to time.
Once this script has complete once to delete a potentially large volume of data, the batch process to delete newly obsoleted data will then typically be able to complete without a timeout condition continuing to occur.
Additional information
See the following page noting the introduction of the feature to cleanup obsolete inventory: Auto-cleanup of obsolete FlexNet inventory.
Fix status
This issue is still open but not currently scheduled to be addressed.
Other information
Affected components: Batch processing, Inventory
Master issue ID: IOJ-2253591
Also known as: ITAM-402
Tip: If you have been impacted by this issue, please click the KUDOS button above. This helps to track the relative significance and importance of issues. Clicking on an option against "Was this article helpful?" also helps assess and improve the usefulness of content.