product version job collection was modified enumeration operation may not execute

Product Version Job Collection was modified enumeration operation may not execute

No comments

Loading

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:

You may download the below SharePoint eBook:

Download SharePoint Online PDF Book

Download SharePoint Online & Office 365 Administration eBook

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:



Buy SharePoint Online & Office 365 Administration eBook


 

Get the free demo PDF eBook from here:

FREE DOWNLOAD

Send download link to:

Subscribe to get exclusive content and recommendations every month. You can unsubscribe anytime.

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment