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

Vote:
 

Hi,

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))
                                                    .GetResult();


 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?

Sincerly
Salmin

#147074
Apr 05, 2016 17:58
Vote:
 

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

#147108
Apr 06, 2016 12:28
Vote:
 

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

http://pastebin.com/embed_iframe/yn7Zw1wD

#147110
Edited, Apr 06, 2016 13:15
Vote:
 

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:

<system.net>
    <defaultProxy>
      <!-- fiddler -->
      <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" 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.

#147113
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.