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
I use the aws-sdk-lambda gem to invoke Lambda functions with the Aws::Lambda::Client#invoke method. My functions return JSON strings which then get parsed.
Recently I added X-Ray via the aws-xray-sdk gem and found that if I activate the net_http and aws_sdk patches the response of the Lambda functions sometimes gets scrambled. One or more of the last bytes are appended to the end which leads to a parsing error.
AFAICS this happens to longer responses (around 1K) only but not to short (around 100 bytes) ones. Also when retrying the invocation immediately the response is unscrambled.
When disabling the aws_sdk patch this does not seem to happen.
The text was updated successfully, but these errors were encountered:
I'm not allowed to, but I don't think that this would help because the response is already fully read and any code touching it is no longer in the stack trace.
However, I have another detail that may be of interest: The issue only happens in multi-threaded (MRI with GIL) environment. We perform around 15 Lambda calls in parallel. Maybe it's a thread-safety issue?
I will take a look at aws_sdk patching code and see if there is any potential issue. Please feel free to share any further findings or a sample repro script. That would also help a lot.
I use the
aws-sdk-lambda
gem to invoke Lambda functions with theAws::Lambda::Client#invoke
method. My functions return JSON strings which then get parsed.Recently I added X-Ray via the
aws-xray-sdk
gem and found that if I activate thenet_http
andaws_sdk
patches the response of the Lambda functions sometimes gets scrambled. One or more of the last bytes are appended to the end which leads to a parsing error.AFAICS this happens to longer responses (around 1K) only but not to short (around 100 bytes) ones. Also when retrying the invocation immediately the response is unscrambled.
When disabling the
aws_sdk
patch this does not seem to happen.The text was updated successfully, but these errors were encountered: