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

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

7 Replies

@JasjitChopra,

 

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?

 

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.

Hi @JasjitChopra,

 

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.

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

@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

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.

Hello @Juzik , Did you fix the issue ? and you @JasjitChopra ? Could you add how you get it ? Thank you