Merge #5051
Some checks failed
Test suite / Tests on ${{ matrix.os }} (macos-12) (push) Waiting to run
Test suite / Tests almost all features (push) Has been skipped
Test suite / Test disabled tokenization (push) Has been skipped
Test suite / Tests on ubuntu-20.04 (push) Failing after 28s
Test suite / Run tests in debug (push) Failing after 31s
Test suite / Run Rustfmt (push) Successful in 2m6s
Test suite / Tests on ${{ matrix.os }} (windows-2022) (push) Failing after 8m36s
Test suite / Run Clippy (push) Failing after 21m21s

5051: Add timeout on read and write operations. r=irevoire a=dureuill

# Pull Request

## Related issue
Addresses #5054 

## What does this PR do?
- Add a timeout for read and write operations in the REST embedder. This might address some issues about tasks that get "stuck" while embedding documents.


Co-authored-by: Louis Dureuil <louis@meilisearch.com>
This commit is contained in:
meili-bors[bot] 2024-11-14 08:34:43 +00:00 committed by GitHub
commit 4e1ac9b0b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,6 +131,7 @@ impl Embedder {
let client = ureq::AgentBuilder::new() let client = ureq::AgentBuilder::new()
.max_idle_connections(REQUEST_PARALLELISM * 2) .max_idle_connections(REQUEST_PARALLELISM * 2)
.max_idle_connections_per_host(REQUEST_PARALLELISM * 2) .max_idle_connections_per_host(REQUEST_PARALLELISM * 2)
.timeout(std::time::Duration::from_secs(30))
.build(); .build();
let request = Request::new(options.request)?; let request = Request::new(options.request)?;