- Newest
- Most votes
- Most comments
The error you're encountering is related to a concurrent request limit for Amazon Bedrock's Knowledge Base feature. This limit of 10 concurrent IngestKnowledgeBaseDocuments and DeleteKnowledgeBaseDocuments requests is indeed a constraint set by the service.
To address your questions:
-
This 10-request limit appears to be a hard limit set by Bedrock. As of now, there's no indication that this limit can be increased through a service quota request. These types of limits are often in place to ensure service stability and performance for all users.
-
This error is common when trying to ingest or delete multiple documents simultaneously, especially when dealing with larger sets of documents or when making rapid, concurrent API calls.
-
For batch uploading larger sets of documents to a Knowledge Base, the best practice is to implement a throttling or serialization mechanism in your code. Here are some recommendations:
- Implement a queue system to manage your document ingestion requests.
- Use a rate-limiting approach to control the number of concurrent requests.
- Implement retry logic with exponential backoff for failed requests.
- Consider breaking your document set into smaller batches and process them sequentially.
To implement these best practices, you could create a request manager that controls the flow of ingestion requests. This manager would ensure that no more than 10 requests are in flight at any given time. When a new request is ready to be sent, it would check if the maximum concurrent limit has been reached. If so, it would wait until an ongoing request completes before sending the new one.
Here's a high-level approach you could consider:
- Create a queue for your ingestion requests.
- Set up a pool of worker threads (maximum of 10) to process the queue.
- Each worker thread takes a document from the queue, sends the ingestion request, and waits for it to complete before processing the next document.
- Implement error handling and retries for failed requests.
This approach will help you stay within the service limits while efficiently processing your document set. Remember to handle any errors gracefully and implement appropriate logging to track the progress of your ingestion process.
By following these practices, you should be able to ingest larger sets of documents to your Knowledge Base without encountering the concurrent request limit error.
Sources
Assistance Required for Resolving ThrottlingException Errors with Bedrock API | AWS re:Post
Amazon Bedrock Data Source syncing error | AWS re:Post
answered a year ago
Relevant content
asked 10 months ago
- AWS OFFICIALUpdated 2 years ago
