Skip to content
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

Max retries and connection timeout arguments #109

Closed
lisovskey opened this issue Dec 22, 2020 · 3 comments
Closed

Max retries and connection timeout arguments #109

lisovskey opened this issue Dec 22, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@lisovskey
Copy link
Contributor

lisovskey commented Dec 22, 2020

Sometimes I have connection issues when uploading data via load_and_copy, for example:

botocore.exceptions.ConnectionClosedError:
Connection was closed before we received a valid response from endpoint URL: "https://MY-S3-FILE".

I found a proposition to use bigger connection_timeout in this thread. Also I'm interested in using retries option (it's zero by default I guess). Both are attributes of botocore.config.Config.

Can I somehow pass Config to Redshift object?

@fdosani
Copy link
Member

fdosani commented Jan 4, 2021

Sorry was out of the office for the holidays. Taking a look at this now.

@fdosani
Copy link
Member

fdosani commented Jan 4, 2021

@lisovskey I'm wondering if in the Redshift's __init__ you can use the profile argument to set it via profile settings: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html?highlight=retries#using-a-configuration-file

This should flow through to the S3 object and set it for its session: https://github.com/capitalone/locopy/blob/develop/locopy/s3.py#L99

Maybe give that a try and see if it gets things working for you?

@fdosani fdosani self-assigned this Jan 4, 2021
@fdosani fdosani added the question Further information is requested label Jan 4, 2021
@lisovskey
Copy link
Contributor Author

@fdosani thanks, environment variable AWS_MAX_ATTEMPTS worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants