question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InstanceMetadataProvider hangs on load() 100% reproducible

See original GitHub issue

Hi guys,

Starting from boto3 version 1.10.0 the following code hangs on line 104:

102         t = InstanceMetadataFetcher(timeout=1000, num_attempts=2)
103         provider = InstanceMetadataProvider(iam_role_fetcher=t)
104    ->   creds = provider.load()

Tracing it further it stuck request at: botocore/utils.py:296

                response = self._session.send(request.prepare())

None of 1.9.xxx versions had this issue. Python 3.7.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
swetashrecommented, Feb 5, 2020

When i only run the test.py file i am not getting any error so i don’t think this error is related to boto3. As you have already mentioned that this error can only be seen with kubernetes , i am assuming this is something related to kubernetes. I don’t have much knowledge about kubernetes. I would recommend posting on their github repo .

0reactions
praneetha1595commented, Sep 29, 2022

seeing this issue seems like if we reduce timeout to 1 sec, the process seems to be done. timeout as 1000 making it look like third line is unreachable, but anyway why are we waiting for timeout to give a response is the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found