Skip to content

Conversation

@anthony-ism
Copy link

I noticed an issue with the lib, if my http client initially failed, it would never work from that point forward until the process was restarted.

This is an issue with the "AsynceCacheControl" lib, because it is waiting for a failed request to finish and that will never happen, however this lib could easily prevent this from happening with this PR.

To reproduce what I was seeing, in a docker container I removed the default gateway (disconnected from the internet) and attempted to verify a jwt. It fails, as it should because it cannot connect to the host. However, each subsequent failure is a "Timeout" failure, which originates here (https://github.com/MasterSergius/acachecontrol/blob/master/src/acachecontrol/cache.py#L131).

This is because cache contains this request, it doesn't even attempt the http call again because its waiting for the failed one to finish.

So even after the internet is reestablished it will not move passed the timeout issue until the process is restarted.

Hope this helps, and thanks for the lib!

Thanks!

@jrybinski
Copy link

Can we merge it? Please review @serhiibuniak-okta
We have problems with cached timeouts in the latest version. It would be nice to have it fixed.

@cbatal-tw
Copy link

We are also facing the same problem and it would be nice if we could get this fix in as well.

@bryanapellanes-okta are you possibly able to review this?

@bohdansolovey
Copy link

We have the same problem. In case of unexpected errors, the web application worker gets stuck in this place for 30 seconds until it restarts (manually)
In our case, we decided to use our request client instead of the one used by this library

@BinoyOza-okta BinoyOza-okta self-requested a review December 2, 2025 16:11
Copy link
Contributor

@BinoyOza-okta BinoyOza-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, and apologies for the wait! The code looks solid, but we require commits to be verified. Could you please re-sign your commit and force push the update? Let me know if you need help with this!

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.

5 participants