Skip to content

Default client timeout (60s) is shorter than the server-side timeout (90s) #59

Open

Description

@pranavkafle

The SDK's default request timeout is 60 seconds (timeout: 60000 in src/config.ts, also documented in the README), but SerpApi's server-side timeout is 90 seconds.

For slower searches that finish between 60 and 90 seconds, the SDK gives up with RequestTimeoutError even though SerpApi would have returned a result. The customer gets an error, and the search may still be completed and charged on our side.

This may be the cause of #34 (customer seeing "The request was timed out" on v2.2.1).

Proposal: raise the default timeout to at least 90000 ms (or slightly above, e.g. 95000, to allow for network overhead), and update the README to match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions