-
Notifications
You must be signed in to change notification settings - Fork 59
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
[ADAP-564] [Regression] unpack_from requires a buffer of at least 5 bytes for unpacking 5 bytes at offset 0 (actual buffer size is 0) #456
Comments
@pdebelak thank you for reaching out! And thanks for linking to aws/amazon-redshift-python-driver#142 Is there a specific dbt project setup (model, seed, etc) that I can use to reproduce this error? Or is it really dependent upon something on the Redshift side of things that will be hard to reproduce? My gut says that this is a |
@dbeatty10 I haven't figured out a reproducible example for this, but I agree that this seems to be an issue with |
@pdebelak Would you be willing to run the following and share the output?
Thank you for opening that Discussion -- I'll respond there. |
Root causeWhen a network connection is lost unexpectedly, the error message doesn't help the user realize it's really a network connection issue. BackgroundPrior to Mar 27, 2021, the README of
Potential solutionThe solution is likely two parts:
These commits in Related issuesHere's a listing of related issues across both redshift_connector and pg8000: pg8000
redshift_connector
|
closing in favor of: aws/amazon-redshift-python-driver#164 @pdebelak I have confidence that we can get this fixed on the driver once and for all! thanks again for all your work reporting this |
I'm facing the same issue with redshift_connector: |
@nischay-merkle sorry to hear that! what version of the dbt-redshift adapter are you using? I am confident that should be resolved in the latest patch of 1.5, |
@dataders I'm currently using: redshift-connector 2.0.903. It's a python Client library (https://pypi.org/project/redshift-connector/) for redshift. |
@nischay-merkle are you experiencing a problem with dbt-redshift? If so, can you share the output from this command? dbt --version If you are using redshift_connector without using dbt-redshift, then you should subscribe to this issue instead: TLDRThis error message happens when a network connection is lost unexpectedly, and here are Amazon's recommendations to avoid it. |
I'm facing the same issue. And like in this comment, it happens at 10 minutes. It does not affect production, but development. We run 1.2 in production and develop in the same. Here we get the error: As we are planning to upgrade to 1.6 soon, I just got the latest rc version using:
And here I'm getting: |
I'm facing the same issue, in my case I'm not using redshift-connector. My dbt versions are the following:
The error commented before on the post randomly raises, independently of the table. I'm just running some sql scripts in order to deploy changes on my databases. It only happens on GitHub, same jobs run correctly at DBT Cloud. |
I'm also facing this issue with 1.6 |
As proposed here, it would be more helpful if the error message said something like this instead:
I have run into this error message myself several times, and I frequently forget what it means! 😰 That error message means that the database connection was lost while processing. It comes from There's an issue open to improve the error message, and here are Amazon's recommendations to avoid it. I'm going to leave this issue as closed since the best place to solve this is via aws/amazon-redshift-python-driver#164. Please feel free to upvote or comment on that issue. |
What can I do to avoid loosing database connection? Is that a parameter? Our model takes 30min to build in python |
we are also getting this error with |
Getting this error when using redshift-connector ==2.1.1 and working with multiprocessing.. any ideas ? |
@Sairam90 dbt-core doesn't support safe parallel execution for multiple invocations in the same process. See below for more details:
If you are experiencing a problem with a supported feature of If you are getting an error message similar to "unpack_from requires a buffer ..." it is most likely a bug report that is appropriate to open in the |
Is this a regression in a recent version of dbt-redshift?
Current Behavior
Some models sometimes give an error
unpack_from requires a buffer of at least 5 bytes for unpacking 5 bytes at offset 0 (actual buffer size is 0)
that is potentially related to whatever the issue is in aws/amazon-redshift-python-driver#142Expected/Previous Behavior
Models run correctly.
Steps To Reproduce
redshift-connector
instead ofpsycopg2
to connect to redshiftRelevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: