sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Random 500 internal server errors with different APIs and operations at SharePoint Online

Open advdberg opened this issue 7 years ago • 125 comments

Category

[X] Bug [ ] Enhancement

Environment

[X] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013

Expected or Desired Behavior

Template is applied without errors (or at least with detailed errors)

Observed Behavior

We get an Intermittant 500 server error on applying a template with the following tracelog:

powershell.exe Information: 0 : 2019-10-08 14:40:40.6587    [OfficeDevPnP.Core]    [0]    [Information]    Adding field (382aae1d-7054-4b5d-85ca-ead7dfdd96f0) to content type (0x01010043443884AE06CF4D9F9C2D75C47BF75A).    0ms   
powershell.exe Information: 0 : 2019-10-08 14:40:42.7683    [OfficeDevPnP.Core]    [0]    [Information]    Adding field (eea8f2b4-9508-46a0-9f42-69008561a746) to content type (0x01010043443884AE06CF4D9F9C2D75C47BF75A).    0ms   
powershell.exe Error: 0 : 2019-10-08 14:40:42.8361    [OfficeDevPnP.Core]    [0]    [Error]    ExecuteQuery threw following exception: System.Net.WebException: De externe server heeft een fout geretourneerd: (500) Interne serverfout.
   bij System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   bij System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.SPWebRequestExecutor.<ExecuteAsync>d__0.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryToServerAsync>d__6.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryAsync>d__0.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.ClientRuntimeContext.<ExecuteQueryAsync>d__0.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.ClientContext.<ExecuteQueryAsync>d__4.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Microsoft.SharePoint.Client.ClientContextExtensions.<ExecuteQueryImplementation>d__7.MoveNext().    0ms   
powershell.exe Information: 0 : 2019-10-08 14:40:42.8371    [Content Types]    [15]    [Debug]    Code execution scope ended    115033ms    57b414c0-2d01-471d-b956-b5bab9c3667f
powershell.exe Information: 0 : 2019-10-08 14:40:42.8371    [Provisioning]    [15]    [Debug]    Code execution scope ended    168283ms    57b414c0-2d01-471d-b956-b5bab9c3667f

Steps to Reproduce

execute the following PowerShell: Apply-PnPProvisioningTemplate -Path "C:\temp\SiteTemplate(1).xml" -Verbose

advdberg avatar Oct 09 '19 09:10 advdberg

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Oct 09 '19 09:10 ghost

Similar error here but with c#. 2 days ago we have applied Templates to created sites without any problem.

2019-11-14 10:28:09,594 ERROR MSF_Meetig_Site_v2.Program - ERROR: The remote server returned an error: (500) Internal Server Error. 2019-11-14 10:28:09,595 ERROR MSF_Meetig_Site_v2.Program - STACK: 2019-11-14 10:28:09,630 ERROR MSF_Meetig_Site_v2.Program - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.SPWebRequestExecutor.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientRequest.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientRequest.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientRuntimeContext.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContext.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContextExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.SharePoint.Client.ClientContextExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay, String userAgent) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.CreateView(Web web, View view, ViewCollection existingViews, List createdList, PnPMonitoredScope monitoredScope, TokenParser parser, Int32 currentViewIndex, Int32 total) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ProcessViews(Web web, TokenParser parser, PnPMonitoredScope scope, ListInfo listInfo) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ProvisionObjects(Web web, ProvisioningTemplate template, TokenParser parser, ProvisioningTemplateApplyingInformation applyingInformation) at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyRemoteTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation provisioningInfo, Boolean calledFromHierarchy, TokenParser tokenParser) at Microsoft.SharePoint.Client.WebExtensions.ApplyProvisioningTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation applyingInformation) at MSF_Meetig_Site_v2.Program.ApplyTemplate(String parent, String platformName, String userName, SecureString pwd)

Any solution?

Kind regards,

marcjornet avatar Nov 14 '19 11:11 marcjornet

We still see the same behaviour in our logging system. In our Provisioning solution we retry applying the template for 2 times (so 3 in total) this seems to cover most of the scenarios where we get these errors but that sometimes causes massive delays in provisoning a ready-to-use collaboration environment while some templates might take up to 30 minutes to apply. Depending on in what stage of the template the error is thrown it can take up to 2 to 3 times the normal time to get a fully operational site.

advdberg avatar Nov 15 '19 09:11 advdberg

Same here, yesterday for some sites we had to retry more than 5 times, being a mess for our customer :(

marcjornet avatar Nov 15 '19 09:11 marcjornet

We have been encountering the same issue over the last 2 months or so. From our logging it seems to happen across different stages of the provisioning, sometimes after configuring Search Settings, sometimes during configuring List Instances.

richardb52 avatar Nov 15 '19 17:11 richardb52

I can confirm I have the same issue as well. I had a provisioning script that worked just fine up until 1-2 weeks ago.

Now all of a sudden the provisioning engine stops at what I can only describe as random points in the XML execution, just like @richardb52 testifies as well. Sometimes it stops right away when applying security, sometimes after applying site settings and sometimes when updating/creating a list.

What is always happening though is that the code execution stops with the error "The remote server returned an error: (500) Internal Server Error."

mblennegard avatar Nov 18 '19 10:11 mblennegard

I can confirm I have the same issue as well.

"The remote server returned an error: (500) Internal Server Error."

JBestebreurtje avatar Nov 18 '19 10:11 JBestebreurtje

We see an increasing number of 500 errors on multiple environments since a couple of hours. The service health message points out it's a 'global' issue image

advdberg avatar Nov 18 '19 10:11 advdberg

we are also facing the same issue. At various stages of the site creation it gives the "500 Internal Server error". Also noted that it took 20 minutes to create a modern communication site using the provisioning engine.

arunkumarperumal avatar Nov 18 '19 14:11 arunkumarperumal

We are also experiencing this issue, we can stumble our way through by continually trying to apply the template again and again, but that's not really a feasible solution.

virtualducttape avatar Nov 18 '19 15:11 virtualducttape

Since today we are also facing the same issue. The same template can be provisioned several times without any problem, but next several times comes this error.

mbratukha avatar Nov 18 '19 16:11 mbratukha

Same issue here.

vilmarci avatar Nov 18 '19 17:11 vilmarci

Same issue .

green-munkey avatar Nov 18 '19 19:11 green-munkey

Same issue on several tenants. Random Internal Server Errors when deploying a template.

fzbm avatar Nov 19 '19 06:11 fzbm

same issue on multiple tenants

jackpoz avatar Nov 19 '19 07:11 jackpoz

During the last weeks/month the overall SPO infractructure is getting worse and worse. This is a really annoying situation for us and all of our customers. Again a great firework of new UI features Microsoft announced at Inspire but there is no single word about Microsoft's invest in hardening or performance improvements for the overall infrastructure... (Mostly all of our customer tenants have a SharePoint Healthscore greater 7 ;-( )

And what is even more frustrating is the overall Communication of Microsoft! The so called "Network Incident" they notified about yesterday (see above) was visible for 2 hours...

@VesaJuvonen @PaoloPia @

netti01 avatar Nov 19 '19 07:11 netti01

same issue here on several tenants.

pnpgit-ds avatar Nov 19 '19 08:11 pnpgit-ds

Same issue, it fails at different steps on multiple tenants.

cleferman avatar Nov 19 '19 08:11 cleferman

Same issue for me on several tenants. 500 server errors randomly retrieve when try apply template. Situation went wrong couple of days ago.

We have lot of provisioning systems based on pnp templating and situation is frustrating for me when i must repeat and repeat provisioning manually for each individual fail.

h3rd4 avatar Nov 19 '19 09:11 h3rd4

Same issue here. Has anyone reported this one to support?

My experience is that they will point to PnP and close the issue. Maybe we could join forces - I am happy to escalate to our account manager at MSFT

tarjeil avatar Nov 19 '19 09:11 tarjeil