Remove-SPUser operation hangs and brings the whole web application down. Need troubleshooting help !

%3CLINGO-SUB%20id%3D%22lingo-sub-30850%22%20slang%3D%22en-US%22%3ERemove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20help%20!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30850%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Eeveryone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFacing%20a%20unique%20issue%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESP%202013%20Farm%20Version%3A%26nbsp%3B15.0.4649.1000%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20export%20and%20import%20a%20document%20library%20including%20security.%20While%20importing%20the%20process%20just%20hangs%20at%20importing%20one%20specific%20user%20and%20bring%20the%20whole%20farm%20down.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20am%20unable%20to%20temporarily%20remove%20that%20user%20from%20the%20site%20collection%20via%20GUI%20or%20via%20powershell%20using%20Remove-SPUser%20-%20gives%20me%20the%20same%20result%20-%20hangs%20the%20web%20app%20for%20indefinite%20period%20of%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHas%20anyone%20seen%20this%20issue%20before%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EJasjit%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-30850%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31632%22%20slang%3D%22en-US%22%3ERe%3A%20Remove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20he%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31632%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F130%22%20target%3D%22_blank%22%3E%40Trevor%20Seward%3C%2FA%3E%26nbsp%3BThere%20is%20an%20Update%20command%20that%20is%20blocking%20All%20further%20queries%20to%20the%20DB....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20end%20portion%20of%20T-SQL%20command%20batch%3C%2FP%3E%3CP%3EOUTPUT%3B%20IF%20%40iRet%20%26lt%3B%26gt%3B%200%20BEGIN%20ROLLBACK%20TRAN%3B%20GOTO%20DONE%3B%20END%3CBR%20%2F%3EEXEC%20proc_ClearLinks%20%40S%2C%40DN%2C%40LN%2C%40Level%2C%20%40wssp72%3B%3CBR%20%2F%3EEXEC%20proc_ClearLinks%20%40S%2C%40DN%2C%40LN%2C%40Level%2C%20%40wssp73%3B%3CBR%20%2F%3EEXEC%20proc_ClearLinks%20%40S%2C%40DN%2C%40LN%2C%40Level%2C%20%40wssp74%3B%20END%20%3B%20COMMIT%20TRAN%3B%20EXEC%20proc_UpdateDiskUsed%20%40S%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETask%20State%20Runnable%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31464%22%20slang%3D%22en-US%22%3ERe%3A%20Remove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20he%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31464%22%20slang%3D%22en-US%22%3EAre%20you%20able%20to%20see%20any%20SQL%20blocking%20queries%20or%20anything%20useful%20in%20ULS%20while%20on%20VerboseEx%20mode%20when%20you%20run%20Remove-SPUser%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31460%22%20slang%3D%22en-US%22%3ERe%3A%20Remove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20he%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31460%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24559%22%20target%3D%22_blank%22%3E%40Jasjit%20Chopra%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understand%20that%20this%20is%20an%20on-premises%20environment.%20The%20reason%20why%20I%20suggested%20to%20use%20PnP%20is%20that%20it%20is%20easier%20to%20debug%20any%20issues%20with%20a%20site.%20Also%20within%20an%20on-premises%20environment%20PnP%20PowerShell%20can%20help%20you%20debug%20out%20of%20the%20box%20fucntionality.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20export%20the%20site%20with%20Get-PnPProvisioningTemplate%20and%20make%20sure%20that%20you%20use%20the%20.xml%20fiel%20format%20then%20you%20can%20Apply%20the%20template%20with%20Apply-PnPProvisioningTemplate%20with%20the%20debug%20switch%20on%20using%20Set-TraceLog%20-On%20-Level%20Debug.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20migth%20find%20that%20the%20issue%20is%20something%20trivial%20with%20permissions%20that%20isn't%20anything%20to%20do%20with%20the%20content.%20I%20agree%20that%20you%20would%20need%20a%20bit%20of%20luck%20for%20PnP%20to%20fail%20the%20same%20way%20as%20the%20Import-SPWeb%20Cmdlet%20but%20it%20i%20worth%20a%20shot.%20It%20would%20be%20interesting%20to%20see%20if%20at%20least%20your%20site%20get%20recreated%20or%20not.%20It%20could%20be%20as%20simple%20as%20a%20default%20value%20for%20a%20field%20being%20set%20to%20a%20non%20existing%20account.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31450%22%20slang%3D%22en-US%22%3ERe%3A%20Remove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20he%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31450%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20on-prem%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E.%20The%20import-spweb%20command%20just%20hangs%20at%20one%20user%20and%20since%20this%20process%20is%20before%20any%20documents%20start%20to%20import%20nothing%20gets%20imported.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20user%20is%20corrupt%20somehow%20and%20I%20cannot%20figure%20out%20to%20forcely%20delete%20it%20from%20the%20site%20collection.%20If%20I%20can%20fix%20the%20user%20by%20using%20the%20remove-spuser%20then%20import-spweb%20will%20work%20without%20issues.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-31016%22%20slang%3D%22en-US%22%3ERe%3A%20Remove-SPUser%20operation%20hangs%20and%20brings%20the%20whole%20web%20application%20down.%20Need%20troubleshooting%20he%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-31016%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24559%22%20target%3D%22_blank%22%3E%40Jasjit%20Chopra%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20give%20some%20more%20details%20on%20the%20document%20library%20in%20question.%20Are%20you%20using%20save%20document%20library%20as%20template%3F%20Or%20are%20you%20exporting%20using%20PnP%3F%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20many%20documents%20have%20you%20got%20included%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20use%20PnP%20PowerShell%20to%20export%2Fimport%20the%20library.%20Do%20you%20get%20the%20same%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
MVP

Hi Eeveryone,

 

Facing a unique issue here.

 

SP 2013 Farm Version: 15.0.4649.1000

 

I tried to export and import a document library including security. While importing the process just hangs at importing one specific user and bring the whole farm down.

 

Now I am unable to temporarily remove that user from the site collection via GUI or via powershell using Remove-SPUser - gives me the same result - hangs the web app for indefinite period of time.

 

Has anyone seen this issue before?

 

Regards,

Jasjit

6 Replies
Highlighted

@Jasjit Chopra,

 

Can you give some more details on the document library in question. Are you using save document library as template? Or are you exporting using PnP?  

 

How many documents have you got included?

 

If you use PnP PowerShell to export/import the library. Do you get the same issue?

 

Highlighted

This is on-prem @Pieter Veenstra. The import-spweb command just hangs at one user and since this process is before any documents start to import nothing gets imported.

 

The user is corrupt somehow and I cannot figure out to forcely delete it from the site collection. If I can fix the user by using the remove-spuser then import-spweb will work without issues.

Highlighted

Hi @Jasjit Chopra,

 

I understand that this is an on-premises environment. The reason why I suggested to use PnP is that it is easier to debug any issues with a site. Also within an on-premises environment PnP PowerShell can help you debug out of the box fucntionality.

 

If you export the site with Get-PnPProvisioningTemplate and make sure that you use the .xml fiel format then you can Apply the template with Apply-PnPProvisioningTemplate with the debug switch on using Set-TraceLog -On -Level Debug. 

 

You migth find that the issue is something trivial with permissions that isn't anything to do with the content. I agree that you would need a bit of luck for PnP to fail the same way as the Import-SPWeb Cmdlet but it i worth a shot. It would be interesting to see if at least your site get recreated or not. It could be as simple as a default value for a field being set to a non existing account.

Highlighted
Are you able to see any SQL blocking queries or anything useful in ULS while on VerboseEx mode when you run Remove-SPUser?
Highlighted

@Trevor Seward There is an Update command that is blocking All further queries to the DB....

 

This is the end portion of T-SQL command batch

OUTPUT; IF @iRet <> 0 BEGIN ROLLBACK TRAN; GOTO DONE; END
EXEC proc_ClearLinks @S,@DN,@LN,@Level, @wssp72;
EXEC proc_ClearLinks @S,@DN,@LN,@Level, @wssp73;
EXEC proc_ClearLinks @S,@DN,@LN,@Level, @wssp74; END ; COMMIT TRAN; EXEC proc_UpdateDiskUsed @S,

 

Task State Runnable

Highlighted
Hello, Did you ever fix the issue ? We have exactly the same issue and I don't know how to handle it ...issue occurs on both TEST & PROD environments.