Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

EPiServer Find 429 Too many requests on a cached method



A customers site that I'm working on is getting error (429): Too many requests once in a while. A simple way to allways re-create the error is to hold "enterkey" on the search function. The search basicly does this:

var result = searchHits.StaticallyCacheFor(TimeSpan.FromMinutes(5))

 The error: 

The request:

I could make a timeout on the search in javascript to prevent someone from holding enter, but I'm confused about why we get a 429 when the query is supposed to be cached?


Apr 05, 2016 17:58

Could you paste your query? Make sure you do not have a DateTime.Now in there. If you do, each query will be unique.

Apr 06, 2016 12:28

I don't know exactly what part to send so here is the whole method:

Edited, Apr 06, 2016 13:15

Ah, that's a lot of code :-)

One thing you could try is to inspect the queries that are being made to Find in Fiddler. To do this, add the following to web.config:

      <!-- fiddler -->
      <proxy autoDetect="false" bypassonlocal="false" proxyaddress="" usesystemdefault="false"/>

By doing this you should easily be able to see how many requests are done. If you are getting requests for every page refresh, something is wrong with the caching. You could then inspect the queries and compare the values to see what the difference is.

Apr 06, 2016 13:48
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.