Thanks for the response, and let me know if a support ticket will be more appropriate for debugging this.
Answers:
1 - We added the tests that involve our code and the Auth0 Python SDK to our CI cycle several weeks ago; I am fairly confident we’ve had intermittent timeout issues since then.
2 - I just ran the test suite locally; it took about 11 minutes to complete, and 670 calls were made to the Auth0 API (I am counting this via a function that we have that returns an instance of the Auth0 client; I added a line of logging and just counted the number of times that line shows up in the log output for the test suite run; also, we construct one instance of an Auth0 object and then cache that for future usage)
3 - The tests involve many different Auth0 API calls. A common thing for a test to do is create a “customer”, which consists of an Auth0 connection, client, and organization. At the end of such a test, a test fixture deletes that connection/client/organization so that we don’t leave dozens of test-only resources lying around in our Auth0 instance.
4 - We have 2 custom post-login actions. Both should be very fast as neither involves an Auth0 API call or accessing any external resource. Both are effectively just doing “If this condition is true, then add this to the ID or access token”.
I’m currently using the tenacity library to provide retry support on ReadTimeout and ReadTimeoutError occurrences. That seems to be an effective hack, but I’m still wondering why a timeout would occur on a fairly simple operation when the timeout is 20 or 30s. I know what you mean though about debugging this stuff - had a similar problem at my last job where our client library would mysteriously fail with a dropped connection.
Re: the two custom actions - I am going to try a test run where I can reproduce the error somewhat (can normally do this by dropping the timeout to a much lower value), and then remove the two actions and see if I get roughly the same number of intermittent timeouts. Won’t be conclusive, but seems worth investigating.