0

I'm running a FastAPI that makes some external calls to fetch data and it use the cache decorator to store the auth tokens; The app works with in-memory and Redis Backend (usually in-memory for local dev, but I tried to test the code for both backends)

Now, recently I'm moving from sync calls to async calls; I mean, from requests to httpx but I did notice the httpx calls fails when I use redis as cache Backend but works properly when in-memory.

Any ideas to troubleshoot this problem?

Carlos Rojas
  • 334
  • 5
  • 13
  • You might find [this answer](https://stackoverflow.com/a/73736138/17865804), as well as [this answer](https://stackoverflow.com/a/74239367/17865804) and [this answer](https://stackoverflow.com/a/74556972/17865804) helpful – Chris Jul 21 '23 at 03:54
  • Thanks Chris, I really found pretty tricky to explain this issue as it seems not correlated and even was afraid to posted it here. Basically the steps to reproduce it is: A `FastAPI` application + Having a connection to `Redis` + Whatever async call (`httpx.AsyncClient().request(...)` in my case) I found the solution here https://github.com/redis/redis-py/issues/2633. updating to python 3.11.4 solved my problem. – Carlos Rojas Jul 21 '23 at 08:24

1 Answers1

0

I found the solution under this thread https://github.com/redis/redis-py/issues/2633

Update to python 3.11.4 would solve the problem

Carlos Rojas
  • 334
  • 5
  • 13