How can I programmatically check if FIND server is down, and ignore that logic for that moment?
Now we have startpage listings that are fetched directly from FIND, and suddenly...
"EPiServer.Find.ServiceException: The remote server returned an error: (500) Internal Server Error.
EPiServer Find will be back in a moment. Sorry for any inconvenience :-( ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error."
Best practice to avoid exception all the way up?
any ideas are welcome, thanks :-)
Any hint is welcome ... this is pretty cruicial
Seems like a try/catch is the way to go
answer from support
"I don't believe this is covered in the developer documentation but ideally you would want to be careful with how calls to external services (Find included) are implemented, especially in the actual page rendering process.
One thing that reduces the effects in case of a temporary problem is to ensure you have implemented caching, thereby lowering the frequency of your calls. (Caching is available with .StaticallyCacheFor(...) in Find)
However, if the service for whatever reason is unreachable (problem with the service itself, problem with connectivity, ...) when you are making a call to the service then you won't have your requested data. Ideally you would have some fallback in place; maybe a last known good value that can be used or just some generic alternative to fall back to.
In general it's best to be defensive, meaning that you do have something to fall back to in case of trouble and if you can do calls independently from request processing that is preferable for much used data.
Anyway, the only way I can see for testing if the service is working is making calls to it and observing the results ..."
Did you ever get a better resolve for your problem?
We have had similar issues and would love to know how you might have resolved your issue?
When you catch an error, you problably also want to cache that result for a while. A shorter while than when you actually get result back from Find. Why? Because otherwise every user need to wait for a time-out or an error to happen. By caching an empty result for a short while the page rendering will be fast most of time, even if Find is down.
This is a good practice for all external calls.