-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated calls to patch_all() eventually seem to infinite loop #11297
Comments
@palfrey , are you using our |
Nope. But having read https://ddtrace.readthedocs.io/en/stable/integrations.html#pytest I don't think that's what we want. We call |
@palfrey I wasn't able to reproduce this error using the following steps:
Can you modify the test above to reproduce the error you are seeing in your testsuite? |
Up to about 20 seems fine. At 21, 3.7s runtime; 22, 7.2s; 23, 13.72s, and I presume something in the range of doubling as that goes on. |
In ddtrace 2.14.4, if you call
ddtrace.patch_all()
many times, nothing bad seems to happen. In2.15.1
, at some point, something seems to get stuck in an infinite loop. This occurred for us because part of the app setup in our FastAPI app didpatch_all()
and so pytest called it many times.A workaround is something like the following
The text was updated successfully, but these errors were encountered: