Thursday, 1 June 2023

How to fix Solr downtime issue

Recently I came across a scenario, where solr was down. And because of that Issue - all page which using solr logic related component having issue.


Solr down time issue might occur because of

  • Index got deleted
  • JVM full
  • Solr service stopped
  • Solr server having issue

To avoid such issue in future, most of the projects used base class for Search related logic. Please make sure try-catch mechanism applied.


try

{

using (var context = searchIndex.CreateSearchContext())

{   

  var queryable = context.GetQueryable<S>();

         //search logic   

          var results = queryable.GetResults();

          if (results == null) 

return new S[] { };

  return results.ToList();

}

}

catch (Exception e)

{

Log.Error(e.Message, e, this);

return new S[] { };

}

Monday, 1 May 2023

DNS Switch for Sitecore SSO Enabled Application

Recently I worked on a scenario where after an application upgrade and before go live, we were looking to switch DNS for SSO enabled Sitecore Web Application.



There are few and simple steps to follow:

There will be 2 URLs (Live and Upgraded Application), let's say L and U

  • From Site Definition configuration file, swap hostName and targetHostName values between L and U config files.
  • Since we were using WSO2 for SSO authentication, and input request SAML settings were done in web.config, So just need to swap SAML setting values between L and U.
  • Please connect with your WSO2 team mate for SSO Url updates, by adding new ACS Url to authenticate with SSO.

That's it. For us after above 3 changes - it worked.