Editing
Troubleshooting of Google Vertex AI Search in Mandarin
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 疑難排解:Discovery Engine 中的 "Search lite requests" 超出額度錯誤 === '''問題描述''': 當使用 Discovery Engine API 來取得搜尋結果時,發生以下錯誤: <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> '''根本原因:''' 錯誤回應中的 metadata 已標示該額度為 100 請求/分鐘 '''解決步驟''':解決 API 配額限制超出問題 選項一:增加請求 (request) 之間的延遲時間 # 在程式碼中實作延遲時間,以避免 429 錯誤。60 秒 ÷ 100 個請求 = 每個請求 0.6 秒,例如:在每個請求之間添加 0.6 ~ 1 秒的暫停,以符合速率限制。 # 根據配額和請求模式,動態調整延遲時間 選項二:提高額度限制 # 前往 Google Cloud Console 的額度頁面並找到 "Search lite requests per minute" # 選擇相關配額,點擊 "EDIT QUOTAS",並提交更高限制的申請 # 等待 Google Cloud Support 審核批准 選項三:實作指數退避重試機制 # 在應用程式中偵測 HTTP 429 錯誤並設置初始延遲(例如 1 秒) # 每次重試失敗後增加延遲時間(例如 2 秒、4 秒、8 秒等) # 持續重試直到請求成功或達到最大重試次數
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information