Loading...


Related Products


Date Published: October 8, 2025

The Acquia Search flood control mechanism has blocked a Solr query due to API usage limits

Issue

When searching or indexing, you might run into an error stating:

Drupal\search_api_solr\SearchApiSolrException: Solr endpoint [url] unreachable or returned unexpected response code (429). The Acquia Search flood control mechanism has blocked a Solr query due to API usage limits.

or

Flood protection has blocked request of type select.

This is due to the default flood control limitations that come pre-shipped with Acquia Search. Fortunately those configurations can be changed.

Resolution

Ideal: deal with the root cause

The Flood Control system is there to protect your site's Search service from heavy amount of requests from robots, attacks, or other extremely-frequent queries or updates which will consume your paid Search service's limits and reduce stability.

Ideally, if your site suddenly hits the Flood Control limit frequently, you should inspect your traffic via your Acquia stack metrics and logs, which can help you trace the origin of any site traffic or other activities that could be triggering Search requests too frequently.
You can see various of the causes for high Search usage in our documentation in the Acquia Search Documentation: Staying under limits page.
 

Workaround: override the Flood limit on your site(s)

Important Note
Overriding these limits to high values may cause your application's Search usage to exceed your contractual limits. If this happens, you may contacted by our Account Management/Sales team to discuss an entitlement and billing increase, or in extreme cases, your shared Search endpoints may be temporarily disabled to keep platform integrity.
See our Acquia Search Product Guide: Entitlements and Acquia Search Documentation: Staying under limits  pages or more information.


Depending on the scenario where you encounter this error, you might want to tackle this issue in different ways.

The "catch-all" way of dealing with this issue would be to increase those flood control limit values. However, there is a different configuration for each type of query. That means that Solr /select queries can have a different value with regards to flood control limits compared to Solr /update queries.


If you are running into the error while searching, then you would want to increase the /select limit as such, "100" being an example value.

drush --uri=www.example.com cset acquia_search.settings flood_limit.select.limit 100

If after you change the limit you want to verify the limit you need to change it from cset in the command to cget.

drush --uri=www.example.com cget acquia_search.settings flood_limit.select.limit

If on the other hand you are running into the error while indexing, you could either increase the flood control limit for update requests - again "600" is an example value.

drush --uri=www.example.com cset acquia_search.settings flood_limit.update.limit 600

 

Note: If any of the values below is not set, then the defaults apply. A null value does not mean "no limit".


You can also set a specific the window to which this limit applies. The default values are the following and can be found in code, in Drupal\acquia_search\Helper\Flood::getFloodDefaults()

      'select' => ['window' => 10, 'limit' => 50],      'update' => ['window' => 60, 'limit' => 600],      'update/extract' => ['window' => 60, 'limit' => 600],      'autocomplete' => ['window' => 10, 'limit' => 100],      'test' => ['window' => 2, 'limit' => 1],

 The values in code are named 'window' and 'limit'.

  •  window : the amount of seconds in the "sliding window" time
  •  limit : the maximum amount of requests that can be done during that window.

 
So, to check whether to carry out or block the current request, we use look at the window between T-[window] seconds up to the present, and if more than [limit] requests of the same [type] have happened, we will deny that request.

Example: for limit=10 [requests] and window=10 [seconds] allows at most 10 requests in that time period.
See the Drupal Flood API documentation for more:

  • https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Flood%21FloodInterface.php/interface/FloodInterface

Also, for the indexing scenario, you could also increase the amount of entities processed in each batch, thus making the requests less frequent but with a larger data payload. Doing this might then not require to additionally tweak the flood control limitation.
To achieve this, use Drush to index and provide a larger --batch-size argument:

# Index in batches of 250. Note: if you run out of memory, use smaller batches.

drush --uri=www.example.com search-api:index --batch-size=250

 

Further Reading

See our Acquia Search Documentation: Staying under limits document page.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation