Skip to content

Conversation

afarntrog
Copy link
Contributor

@afarntrog afarntrog commented Sep 9, 2025

Description

  • Set DEFAULT_READ_TIMEOUT constant to 120 seconds
  • Configure BotocoreConfig with read_timeout when no custom config provided
  • Add test coverage for default read timeout behavior

In the following link we can see some more re:Posts regarding this timeout issue and the AWS suggested approach.

The timeout errors occur when the AWS SDK for Python (Boto3) client queries the LLM but doesn't receive a response within botocore's default read timeout period. To resolve read timeout errors, increase the read timeout or use streaming APIs.

Note: I was not able to reproduce the read timeout when trying with > ~70,000 tokens (as per a comment on the #699 issue). Tried with many different models as well.

Related Issues

#699

Documentation PR

Type of Change

Bug fix

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Set DEFAULT_READ_TIMEOUT constant to 120 seconds
- Configure BotocoreConfig with read_timeout when no custom config provided
- Add test coverage for default read timeout behavior
@afarntrog afarntrog merged commit 9213bc5 into strands-agents:main Sep 9, 2025
11 of 12 checks passed
This was referenced Sep 17, 2025
Unshure pushed a commit to Unshure/sdk-python that referenced this pull request Sep 24, 2025
- Set DEFAULT_READ_TIMEOUT constant to 120 seconds
- Configure BotocoreConfig with read_timeout when no custom config provided
- Add test coverage for default read timeout behavior
@rromanchuk
Copy link

@dbschmigelski just a heads up, i got the same error as #699 but the issue had nothing to do with actual timeouts or permissions, but container failure.

The problem for me was agentcore launch reports success, codebuild reports success. The only hint i had was invoking always failed with "[BUG] ReadTimeoutError: AWSHTTPSConnectionPool(host='bedrock-runtime.us-east-1.amazonaws.com', port=443): Read timed out." after the same amount of time has passed, even after pairing everything down, hinting this read timeout is not my configuration.

The other hint was observability dashboard went silent. I just used trial and error with requirements.txt because i don't have a clue where runtime exceptions are or how to catch stdout. I mean i do, but i have negative will to be messing around with container ops. Tailing the logs the only thing i could see were the invocation requests, but probably because the container was thrashing/down, or service thrashing because of runtime exception (module not found), but i figured there would be some sort of healthcheck, but the endpoint had a status of ready.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants