Try our conversational search powered by Generative AI!

How to handle FIND server timeout

Vote:
 

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 :-)

/Fredrik

#116705
Feb 04, 2015 10:38
Vote:
 

Any hint is welcome ... this is pretty cruicial

#116812
Feb 05, 2015 11:18
Vote:
 

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 ..."

#116833
Feb 05, 2015 15:09
Vote:
 

Hi,

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?

Thanks

Jon

#150552
Jun 22, 2016 12:43
Vote:
 

Hi,

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.

#150560
Jun 22, 2016 14:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.