You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it recognises the multiple patch, but repatches anyway.
Should _patch return early if it recognises the patch is already in place?
The text was updated successfully, but these errors were encountered:
nathanreynolds-kcom
changed the title
patch_all() can patch modules multiple times
patch_all() can patch modules multiple times, causing RecursionErrors
Sep 19, 2018
Thank you for reporting the issue. This is a bug and we will work on a fix soon. Just want to clarify, does calling patch_all() outside the handler workaround the problem for you? When you say the 1000th call does it mean you got this error in your 1000th lambda function execution?
Haven't tested extensively yet, hopeful having a single patch_all at initialisation should solve it - will let you know if that's not the case.
And yep, we saw it after a single instance of the Lamba function had been called 1000 times. This was under load so we were at max concurrency and all instances were active.
We hit an issue where patch_all() was used in a Lambda function - after the 1000th call we saw a RecursionError when calling
requests.get()
.Example:
We should have called
patch_all()
outside of the function, but this still feels like a gotcha.core.patcher._patch
has this code:So it recognises the multiple patch, but repatches anyway.
Should
_patch
return early if it recognises the patch is already in place?The text was updated successfully, but these errors were encountered: