The product version job collection was modified enumeration operation may not execute – sometimes we may get this error from the SharePoint server that “Product Version Job: Collection was modified; enumeration operation may not execute ((Correlation=0b9de10e-4bb7-4010-ab62-e91d5375e0ac)”, and in the ULS log we will get the below entry:
“at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ReflexiveNeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ReflexiveNeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ReflexiveNeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)
at Microsoft.SharePoint.Administration.SPServerProductInfo.DetectLocalUpgradeStatus()
at Microsoft.SharePoint.Administration.SPServerProductInfo.DetectLocalProductVersions(SPProductVersions prodVer)
at Microsoft.SharePoint.Administration.SPServerProductInfo.UpdateProductInfoInDatabase(Guid serverGuid)
at Microsoft.SharePoint.Administration.SPProductVersionJobDefinition.Execute(Guid targetInstanceId)
at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)”
Before getting into this error we should know what is the production version timer job in SharePoint?
What is the product version timer job in SharePoint?
The timer job “Product Version Job” put the updated software version information from the SharePoint Server onto the SharePoint Databases.
When we might get this product version timer job error or what is the root cause of getting this error?
Generally, it happens when we install SharePoint updates by the user or by the windows update into the SharePoint server. Then to complete the installation we run the SharePoint configuration wizard either through the SharePoint UI or PowerShell command.
What exactly happens when we run the SharePoint configuration wizard?
After successfully running the SharePoint configuration wizard, the SharePoint product binaries i.e. dlls get updated to the newer version which is located on the file system:
C:\windows\assembly, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Policy which is mostly in the hive folder (12/14/15 - based on the SharePoint production version you are using).
When does the Timer Job “Product Version Job” run?
The Timer Job “Product Version Job” runs every night at 12:52 A.M and analyzes which are dlls are updated in the server, once it gets the information then it puts the updated version data on to SharePoint content database “dbo.version” table.
What happens when the timer Job “Product Version Job” runs successfully?
Login to the SharePoint Central Administration site, then go to the Manage Servers in the Farm > you will find the SharePoint Configuration database version number, note down it somewhere in the notepad.
Now open the SQL Management Studio from the SQL server instance -> connect to the SharePoint Instance -> Go to the configuration database (SharePoint_Config) -> open the table “dbo.versions” we will find the same version that we have found and noted down from the previous step – SharePoint manage servers in the farm.
Hence we saw here is keeping the updated version name from the SharePoint Server on to the SharePoint Database is the Job of “Product Version” timer job.
What happens when the timer Job “Product Version Job” does not run successfully?
When the “product version” timer job is failed to update the “dbo.version” table with the updated version information (what we have in the SharePoint manage servers on the farm page), we get the below error:
“Collection was modified; enumeration operation may not execute (Correlation=0b9de10e-4bb7-4010-ab62-e91d5375e0ac)”
How to fix the error Collection was modified; enumeration operation may not execute in SharePoint product version timer job?
In order to fix the above error “Collection was modified; enumeration operation may not execute” in the SharePoint product version timer job, we need to clear the SharePoint config cache in all the SharePoint servers connected to the farm. How to clear the SharePoint config cache, please refer to this article: [Verified]: Clear config cache in SharePoint 2016
Summary: product version job collection was modified enumeration operation may not execute
Thus in this troubleshooting article, we have learned the below with respect to fixing the “Collection was modified; enumeration operation may not execute” error in the SharePoint product version timer job:
- What is the product version timer job in SharePoint?
- When we might get this product version timer job error or what is the root cause of getting this error?
- When does the Timer Job “Product Version Job” run?
- What happens when the timer Job “Product Version Job” runs successfully?
- What happens when the timer Job “Product Version Job” does not run successfully?
- How to fix the error “Collection was modified; enumeration operation may not execute” in the SharePoint product version timer job?
See Also: product version job collection was modified enumeration operation may not execute
You may also like the below SharePoint troubleshooting articles that are from SharePoint On-Premise as well as SharePoint Online:
- [Verified]: Clear config cache in SharePoint 2016
- [Fixed]: The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11
- [Fixed]: The base type ‘.Search.UI.SearchResultsLayoutPage’ is not allowed for this page
- [Fixed]: Missing Site Assets Library in SharePoint Online
- How to fix Open with Explorer issues in SharePoint Online?
- [Fixed]: How to fix No gulpfile found in SPFx framework project
- [Fixed] Error – activate the SharePoint Server Publishing Infrastructure feature in SharePoint Online site
- [Fixed] Server relative urls must start with SPWeb.ServerRelativeUrl”in reading web part properties!
- [Fixed]: The page could not be created. Custom Scripting might be deactivated on the destination site or you might not have sufficient permissions.
- [Fixed] The upgraded database schema doesn’t match the TargetSchema(Failed to upgrade SharePoint Products)
- [Fixed] “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)
- [Fixed] How to fix the “Unexpected response from server. The status code of response is ‘500’ in SharePoint 2016 Search error.”?
- [Fixed] How to fix the wrong tenant credential error in SharePoint online?
- [Fixed] How to fix request timed out error in SharePoint 2016 search (There was no endpoint listening)?
- [Fixed] How to Fix a SharePoint 404 Error in sub site After Restoring a Content Database?
- Versioning in SharePoint
You may download the below SharePoint eBook: