November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
Out of curiosity – do you know how we can fine tune this bit of code so that it will detect a FIND Outage / Timeout etc?
IClient client = Client.CreateFromConfig(); var feedQuery = client.Search<RCOG.Models.Pages.NewsArticleType>(); feedQuery = feedQuery.Filter(x => x.StartPublish.LessThan(DateTime.Now)); feedQuery = feedQuery.Filter(x => x.StartPublish.GreaterThan(DateTime.Now.AddMonths(-1))); feedQuery = feedQuery.Filter(x => !x.StopPublish.LessThan(DateTime.Now)); //AND Stop Publish date is NOT less than today - JR-12/10/2014 feedQuery = feedQuery.OrderByDescending(x => x.StartPublish); feedQuery.StaticallyCacheFor(TimeSpan.FromMinutes(30)); var singleResult = feedQuery.Select(x => new NewsRssResult { Headline = string.IsNullOrEmpty(x.Headline) ? "" : x.Headline, Thumbnail = !string.IsNullOrEmpty(x.SearchImage) ? x.SearchImage : "", ImageCaption = string.IsNullOrEmpty(x.ImageCaption) ? "" : x.ImageCaption, Summary = x.SearchSummary, PublishDate = x.StartPublish, PageLink = string.IsNullOrEmpty(x.LinkURL) ? "" : x.LinkURL }) .GetResult();
Thanks
Jon
1. I would search on something I know would return results. Like start page or similar...you can have a scheduled job that does that and sets a flag in cache that indicates that Find is down.
2. Then implement standard object caching (see my earlier blog articles for a few different ways to do that). Check flag to see if Find is down. If it is return cached. If not, get from Find and cache it...
We were looking at the DefaultRequestTimeout in the webconfig - this may work - but we were not sure what the Int value represents - mins or Seconds.
We changed this to 1 for it to timeout instantly and then we added a Try Catch to capture the operation Timeout exception.
Jon
The DefaultRequestTimeout maps to TimeOut property of HttpWebRequest after a while :)
This value is in ms. So 1000 = 1 second.
https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.timeout(v=vs.110).aspx
So setting it to 1 will probably fail all requests...
This should solve your problems
https://world.optimizely.com/blogs/dada/dates/2022/1/find-requests-and-timeouts/
Jonathan, I suggest putting in a vote on this feature request: https://feedback.optimizely.com/ideas/FIN-I-89
Hi,
On occastions FIND goes offline due to technical reasons. Is there away to:
1. Detect when FIND is non responsive / down
2. Cache results locally and only use when FIND is down.
Thanks
Jon