I discovered the cause. I had the warmup module set to trigger on new content being published. However, the warmup module is getting only 404s because the URL I've got in settings isn't resolving (hosting issue... host resolves to external IP when should resolve
to internal IP).
I have a controller action for a form submission (see code below). When I submit the form, the controller action gets hit immediately and the code runs quite quickly. However, after it returns, the page just hangs for anywhere from 10-30s and even worse on
I'm redirecting to the same page as the form. This page loads very quickly (<1s) on a GET.
I put a breakpoint in the debugger on the controller action, then on the view which loads. I can see the delay here between when the controller returns the redirect and when the view gets hit.
Does anyone know why this redirect could be taking so long to return?
public ActionResult CreatePOST(string returnUrl)
var referPatientSubmission = _contentManager.New("ReferPatientSubmission");
var referPatientSubmissionPart = referPatientSubmission.As<ReferPatientSubmissionPart>();
dynamic model = _contentManager.UpdateEditor(referPatientSubmission, this);
referPatientSubmissionPart.DateCreated = DateTime.Now;
foreach (var error in ModelState.Values.SelectMany(m => m.Errors).Select(e => e.ErrorMessage))
TempData["ShowConfirmationMessage"] = true;
TempData["ReferPatientNumber"] = referPatientSubmission.Id;
_vitalCallServices.Subscribe(referPatientSubmissionPart.ReferrerFirstName + " " + referPatientSubmissionPart.ReferrerSurname, referPatientSubmissionPart.ReferrerEmail, "Referrer");
return this.RedirectLocal(returnUrl, "~/");