typesense-dart icon indicating copy to clipboard operation
typesense-dart copied to clipboard

TimeoutException: TimeoutException after 0:01:00.000000: Future not completed

Open hashimsayed0 opened this issue 7 months ago • 1 comments

Describe the bug

I'm using typesense client to do multi search. When I noticed that TimeoutException was thrown for some users, I kept increasing connectionTimeout and it fixed the issue for some people. At the moment, it's 1 minute and I'm not sure I'm doing the right thing. Some people still face the issue. Would it be best to increase it further? Is there an optimal value for connectionTimeout? Thank yoou.

Steps to reproduce the behavior:

  1. Initialise client
final host = "***.typesense.net";
final config = Configuration(
  // Replace with your configuration
  'apiKey',
  nodes: {
    Node.withUri(
      Uri(
        scheme: 'https',
        host: host,
        port: 443,
      ),
    ),
  },
  numRetries: 3, // A total of 4 tries (1 original try + 3 retries)
  connectionTimeout: const Duration(minutes: 1),
);
final client = Client(config);
  1. Perform multi search
Map<String, dynamic> searchResults =
      await client.multiSearch.perform(searchRequests);

Expected behavior

Return searchResults

Screenshots

N/A

Additional context

N/A

hashimsayed0 avatar Mar 16 '25 09:03 hashimsayed0