Troubleshooting of Google Vertex AI Search: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
(+ Troubleshooting: "Requested Entity Already Exists" Error When Saving Data Stores)
Line 89: Line 89:
'''Solution:'''
'''Solution:'''
Simply remove one of the patterns to resolve the issue. It's recommended to keep the broader pattern <code>''.example.com/''</code> as it already includes <code>example.com</code>.
Simply remove one of the patterns to resolve the issue. It's recommended to keep the broader pattern <code>''.example.com/''</code> as it already includes <code>example.com</code>.
=== Troubleshooting: "Quota exceeded for Search lite requests" Error in Discovery Engine ===
'''Issue Description''': 
When using Discovery Engine API to retrieve search results, the following error occurs:
<pre>
{
  "error" : {
    "code" : 429,
    "message" : "Quota exceeded for quota metric 'Search lite requests' and limit 'Search lite requests per minute' of service 'discoveryengine.googleapis.com' for consumer 'project_number:XXX'.",
    "status" : "RESOURCE_EXHAUSTED",
    ...
  }
}
</pre>
'''Root cause:'''
The metadata in the error response has indicated that the quota value is 100 requests per minute
'''Resolution Steps''': Resolve API Quota Limit Exceedance
Option 1: Increase the delay time between requests
# Add a 1-second pause between each request to stay within rate limits
# Implement this timing delay in your code to prevent 429 errors
# Adjust the delay time as needed based on your quota and request patterns
Option 2: Increase quota limit
# Go to the Quotas page in Google Cloud Console and find "Search lite requests per minute"
# Select the relevant quota, click "EDIT QUOTAS", and submit a request for a higher limit
# Wait for Google Cloud Support to review and approve
Option 3: Implement exponential backoff retry mechanism
# Detect HTTP 429 errors in your application and set an initial delay (e.g., 1 second)
# Increase the delay time with each failed retry (e.g., 2 seconds, 4 seconds, 8 seconds, etc.)
# Continue retrying until the request succeeds or maximum retry count is reached


== Related Pages ==
== Related Pages ==

Revision as of 23:24, 28 April 2025

Troubleshooting of Google Vertex AI API


icon_scale_pencil.png This article "Troubleshooting of Google Vertex AI Search" is still being written. If there are any incomplete parts, you are welcome to directly edit them. 這篇文章「Troubleshooting of Google Vertex AI Search」內容還在撰寫中,如果有不完整的部分,歡迎你直接動手修改


🌐 Switch language: EN, 漢字


Issues

Troubleshooting: Vertex AI Search: Data Repository Requires Enterprise Features

Error: When creating an application, encountered the error message "This application cannot currently use 4 data stores are..." Expanding the data repository list shows "Website data repository can only be linked to Enterprise version of Vertex AI Search applications"

Solution: When creating the application, enable "Enterprise Edition Features"

Troubleshooting: SearchLite API Blocked" Error in Discovery Engine

Issue Description: When attempting to retrieve search results using Google Vertex AI API[1], the following error occurs:

curl -X POST -H "Content-Type: application/json" \
"https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:searchLite?key=API_KEY" \
-d '{
"servingConfig": "projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search",
"query": "QUERY",
}'

Met the error

{
  "code" : 403,
  "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked.",
  "status" : "PERMISSION_DENIED",
  "details" : [
    {
      "@type" : "type.googleapis.com/google.rpc.ErrorInfo",
      "reason" : "API_KEY_SERVICE_BLOCKED",
      "domain" : "googleapis.com",
      "metadata" : {
        "service" : "discoveryengine.googleapis.com",
        "methodName" : "google.cloud.discoveryengine.v1.SearchService.SearchLite",
        "apiName" : "discoveryengine.googleapis.com",
        "consumer" : "projects/xxx"
      }
    },
    {
      "@type" : "type.googleapis.com/google.rpc.LocalizedMessage",
      "locale" : "en-US",
      "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked."
    }
  ]
}

Resolution Steps: Check API Key Restrictions

  • Verify if the key is restricted to specific APIs:
    1. Navigate to the API Key Management page in Google Cloud Console.
    2. Locate the API key being used and check if it is restricted to specific APIs. If the restriction includes discoveryengine.googleapis.com, ensure it is correctly configured.
    3. Remove unnecessary restrictions: If the key is restricted to unrelated IP addresses or applications, remove those restrictions.
  • Enable the Discovery Engine API
    1. Go to the API & Services page in Google Cloud Console.
    2. Search for Discovery Engine API and ensure it is enabled.

Troubleshooting: "Requested Entity Already Exists" Error When Saving Data Stores

Error: When saving site indexing, the following error message appears[2]:

Failed to save sites
Requested entity already exists
Tracking number: <mix of English and numeric characters>

Root Cause: Conflicting URL patterns exist simultaneously in "Specify URL patterns to index":

example.com

and

''.example.com/''

These two patterns conflict with each other, causing the system to treat them as duplicate entities.

Solution: Simply remove one of the patterns to resolve the issue. It's recommended to keep the broader pattern .example.com/ as it already includes example.com.


Troubleshooting: "Quota exceeded for Search lite requests" Error in Discovery Engine

Issue Description: When using Discovery Engine API to retrieve search results, the following error occurs:

{
  "error" : {
    "code" : 429,
    "message" : "Quota exceeded for quota metric 'Search lite requests' and limit 'Search lite requests per minute' of service 'discoveryengine.googleapis.com' for consumer 'project_number:XXX'.",
    "status" : "RESOURCE_EXHAUSTED",
    ...
  }
}

Root cause:

The metadata in the error response has indicated that the quota value is 100 requests per minute

Resolution Steps: Resolve API Quota Limit Exceedance

Option 1: Increase the delay time between requests

  1. Add a 1-second pause between each request to stay within rate limits
  2. Implement this timing delay in your code to prevent 429 errors
  3. Adjust the delay time as needed based on your quota and request patterns

Option 2: Increase quota limit

  1. Go to the Quotas page in Google Cloud Console and find "Search lite requests per minute"
  2. Select the relevant quota, click "EDIT QUOTAS", and submit a request for a higher limit
  3. Wait for Google Cloud Support to review and approve

Option 3: Implement exponential backoff retry mechanism

  1. Detect HTTP 429 errors in your application and set an initial delay (e.g., 1 second)
  2. Increase the delay time with each failed retry (e.g., 2 seconds, 4 seconds, 8 seconds, etc.)
  3. Continue retrying until the request succeeds or maximum retry count is reached

Related Pages


References