estuary-cdk: additional SIGQUIT logging & patching requests.Session.send
for Airbyte imports
#2380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
There have been tricky, intermittent cases of imported Airbyte connectors hanging with essentially no network traffic. I've added some additional logging when a
SIGQUIT
is injected & in theCaptureShim
's methods to help debug when these imports hang.I also have a theory that since Airbyte imports use the
requests
package to make synchronous HTTP requests, therequests
package doesn't have any default timeouts, and I can't find anywhere in theairbyte_cdk
where a timeout is specified forrequests
, that setting a timeout forrequests
might prevent Airbyte imports from hanging until the connector is restarted after 24 hours. I've maderequests_session_send_patch.py
to patch in a default timeout, and imported it in all Airbyte imports. I'm not certain the missing timeouts are the problem, but it's currently the best, actionable theory I have.We've only observed
source-zendesk-support
andsource-jira-native
hanging like this so far, but I chose to patchrequests.Session.send
for all currently imported connectors to avoid playing whack-a-mole with imports that we haven't seen have this issue yet. If any imports still hang forDEFAULT_TIMEOUT
seconds, then we'll know that the issue isn't due to a misingrequests
timeout.Documentation links affected:
(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)
Notes for reviewers:
Confirmed Airbyte imports can still make HTTP requests & receive responses. Confirmed that using
requests
to send an HTTP request to a server that accepts the request but doesn't send data back will timeout afterDEFAULT_TIMEOUT
seconds.This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)