---
title: "Staying under Acquia Search limits"
date: "2024-02-14T06:18:38+00:00"
summary: "Optimize your Acquia Search usage with expert tips on managing resource limits, reducing index usage, and improving performance. Learn strategies to stay within subscription bounds and avoid service disruptions."
image:
type: "page"
url: "/acquia-cloud-platform/staying-under-acquia-search-limits"
id: "81f86d73-5bac-4f91-aaac-97515a26e596"
---

Subscribers with websites that use the Acquia Search platform have limits for some or all of the following resources:

*   Total queries
*   Documents
*   Disk space

If the limits are consistently met or exceeded, Acquia reserves the right to restrict the website’s use of the shared search resources or move your website to a dedicated Acquia Search instance at your expense. Acquia generally does not block access to your Solr index. However, a block may occur in an emergency where your or another customer’s data or service could be impacted.

If you are still below the limits
---------------------------------

If you have not yet reached your usage limits, you can take proactive steps to prevent your website from exceeding them. Consider the following factors as you plan for future usage:

*   What is your monthly usage like?
*   How is your content growing?
*   How much indexable content will your site be generating monthly?
*   What is your projected growth if you are indexing files?
    
    Large attachments can [cause problems for your index](/acquia-cloud-platform/help/93071-issues-large-attachments-and-solr-search "Issues with large attachments and Solr search").
    
*   What are your expected traffic patterns?
    *   Do you expect a growth in visits that trigger search queries?
    *   Are you adding any new functionality, such as [content recommendation blocks](/acquia-cloud-platform/features/acquia-search/customizing/recommendation), autocomplete widgets, or others that increase the number of requests to Solr?
*   What is your non-production usage?
    *   Are you using independent Solr indexes for testing environments?
    *   Will there be heavy searching or indexing in non-production environments?

If you are concerned that you may exceed your limits, your next step is to [create a Support ticket](/service-offerings/support#contact-acquia-support) or contact your account manager to get help to determine the best fit for your website.

If you have exceeded the limits
-------------------------------

If you have exceeded your subscription limits, the following possible actions can be taken:

*   If an extended usage spike causes your current limits to exceed, you may be moved into an isolated Search cluster. [This may incur extra costs. Acquia may contact you to discuss this change](/node/57201#use-of-shared-resources).
*   Your account manager or Acquia Support may contact you with options to change your subscription. Acquia offers multiple Acquia Search packages, which vary in storage size, query limits, and number of documents allowed.
*   You can review your monthly usage and work to reduce usage.

Flood control (rate limiting) for Acquia Search
-----------------------------------------------

Acquia Search includes a built‑in flood control (rate‑limit) mechanism to protect shared Solr infrastructure and your subscription entitlements.

Flood control monitors how many search and index requests are sent to Solr over a sliding time window. If too many requests of the same type occur in a short period, additional requests can be temporarily blocked. After this occurs, you can identify errors such as the following:

*   HTTP status code 429
    
*   Messages that refer to “The Acquia Search flood control mechanism has blocked a Solr query due to API use limits”
    
*   Flood protection has blocked request of type select
    

Flood control exists to protect your site from:

*   Abusive or misconfigured crawlers
    
*   Application bugs that send excessive queries or updates
    
*   Import or batch processes not tuned for Solr
    

Acquia Search uses different flood control rules for:

*   /select requests (end‑user search queries)
    
*   /update requests (index and content updates)
    

In normal traffic, most sites never hit these limits. If your site hits flood control frequently, you must do the following:

*   Review your Acquia metrics and logs to identify which paths, jobs, or integrations send high volumes of Solr requests.
    
*   Check for new features that increase search use (autocomplete, recommendations, faceted navigation, etc.).
    
*   Review your non‑production environments to ensure they do not generate unnecessary search traffic.
    

For detailed error examples and configuration options, including how to adjust limits per request type, visit [The Acquia Search flood control mechanism has blocked a Solr query due to API use limits](/acquia-cloud-platform/help/92851-acquia-search-flood-control-mechanism-has-blocked-solr-query-due-api-usage-limits "The Acquia Search flood control mechanism has blocked a Solr query due to API usage limits").

### Plan for high‑traffic events

After you have a high‑traffic or index event such as a large content import, site launch, or campaign:

1.  ****Plan your index jobs to****:
    
    *   Use larger batch sizes and fewer requests.
        
    *   Run imports during off‑peak hours.
        
2.  ****Monitor****:
    
    *   Search and index rates
        
    *   HTTP error codes (to include 429)
        
    *   Overall Solr performance and throughput
        

Contact Acquia Support if you expect sustained high use that could affect your Acquia Search subscription limits, such as queries, documents, and disk space.

If necessary, you or your development team can temporarily adjust flood‑control limits at the application level to stay within your contractual entitlements. Refer to the troubleshooting article for configuration details and examples: [The Acquia Search flood control mechanism has blocked a Solr query due to API use limits.](/acquia-cloud-platform/help/92851-acquia-search-flood-control-mechanism-has-blocked-solr-query-due-api-usage-limits "The Acquia Search flood control mechanism has blocked a Solr query due to API usage limits")

Search query count
------------------

A search query counts as any Solr request that retrieves content from a Search application.

Action

Description

Search queries

One Solr request is counted when a user types a search term, and then presses **Enter** or clicks the **Search** button.

Filter/Facet selection

One Solr request is counted when a user clicks a facet even if the search term does not change.

Solr Autocomplete vs. SearchStax Auto-Suggest

Each keystroke in the search box can be counted as a request. Each response is counted as a query. However, it depends on your autocomplete configuration:

*   Solr Autocomplete: Directly queries the Solr index and counts as a search query.
*   SearchStax Auto-Suggest: Queries hit their Auto-Suggest core and do not count as a Solr request and do not count against entitlements.

Pagination

One Solr request is counted when a user navigates the pager of the search results page.

API queries

One Solr request is counted when an API call is made to Solr. It also applies to the non-production environments.

Reducing index usage
--------------------

Acquia Search uses three metrics for your subscription: disk storage size, number of Solr requests from Drupal, and the number of documents in the index. You can use different strategies to reduce usage in one or more of these areas.

### Reduce non-production indexes

All of your Acquia subscription’s Solr indexes (production and non-production) count toward your limits. Reduce usage of some or all non-production indexes, or remove indexes entirely to stay within your subscription bounds.

*   [Delete an index and its data](/acquia-cloud-platform/features/acquia-search/getting-started/install-search-d7/d7-apache-solr/indexing#search-delete-index)
*   [Set an index to read-only mode](/acquia-cloud-platform/help/93526-preventing-pollution-solr-search-data-between-environments "Preventing Pollution of Solr Search Data Between Environments")

### Reducing requests to Solr

Several issues can trigger a high number of requests to your Acquia Search Solr backend:

Situation

Action

Autocomplete widgets powered by Solr

*   Ensure autocomplete AJAX requests leverage Acquia’s [Varnish® caching.](/acquia-cloud-platform/performance/varnish)
*   Reduce or eliminate usage of these widgets.

Usage of More Like This [content recommendation](/acquia-cloud-platform/creating-content-recommendation-blocks "Creating content recommendation blocks") blocks

Cache these blocks or reduce their usage.

Elevated traffic that triggers Solr queries

Often caused by crawlers following links that trigger Solr requests.

*   Add `nofollow` directives to facet links to avoid crawlers. [Edit each facet’s](/acquia-cloud-platform/configuring-search-facets "Configuring search facets") **Configure display** settings and enable **Prevent crawlers from following facet links**.
*   Add `robots.txt` directives to avoid spiders accessing search results pages or facet links.

For more information, see [Block excessive crawling of Drupal Views or search results](/acquia-cloud-platform/help/92356-block-excessive-crawling-drupal-views-or-search-results "Block excessive crawling of Drupal Views or search results"). 

The **Index immediately** option is enabled in Search API.

Compounded by mass importing or editing of content.

*   Disable this option in your Search API index settings.

The [Search 404](https://www.drupal.org/project/search404) module is enabled.

Made worse by crawlers and traffic.

*   Disable this module or configure it to avoid triggering on certain requests.

Mass content edits, imports or migrations

Disable indexing while doing any mass content handling.

Out of date modules

Ensure your modules are up to date.

If you are using Drupal 7, one way to understand what data is being sent to your Solr index is to use the [Solr Devel](https://www.drupal.org/project/solr_devel) module, which adds a **Devel > Solr** tab on each entity. This enables you to see what’s already in your Solr index and what data would be sent if you were to index an item.

### Disk storage size

If you are not careful about what you are indexing, the size of your Solr index can increase rapidly, consuming excessive disk space. There are several potential causes:

Situation

Action

Automated Solr `optimize` isn’t running

The Optimize Solr operation is usually invoked weekly by Drupal modules and is responsible for reclaiming disk space after deletes and garbage collection.

*   Ensure cron is running on your site and calling the proper modules’ cron hook. This may not occur on non-production websites.
*   Ensure the module’s weekly optimization runs by checking the timestamp kept here:
    *   For Apache Solr, run `drush solr-variable-get apachesolr_last_optimize`
    *   For Search API, run `drush variable-get search_api_solr_last_optimize`

Indexing too many fields or entity data

This often occurs when indexing nodes with many comments.

*   Disable comments, fields, or other data from being indexed.

Indexing large attachments with large amounts of text

Large PDF or text files can fill disk space quickly.

*   Avoid indexing files larger than 10MB.
*   Use custom code to truncate amount of data stored.
*   See [Issues with large attachments and Solr search](/acquia-cloud-platform/help/93071-issues-large-attachments-and-solr-search "Issues with large attachments and Solr search").

### Number of documents indexed

The relationship between the number of Drupal entities and number of Solr documents is not always one-to-one; Drupal can process a single entity such as a node or a user into multiple Solr documents. For example:

*   `node/1` has three attached files. This can create four Solr documents; one for the node, and one for each attachment.
*   `node/1` has field data in three languages. This may create four Solr documents; one for each language.

To reduce the number of documents in your Solr index:

*   Avoid using Solr multilingual modules if your site uses a single language.
*   Avoid indexing attachments as separate Solr documents.
*   Index only the content types that must be searchable.