-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
[Error] unexpected EOF on client connection with an open transaction #986
Comments
Can you provide a self contained example that reproduces this? |
I am not sure... I see two options, 1) I give you access to the private repo (the project is going to be public so I don't care) or 2) I can try to investigate this week end and let you know on this thread what I have found. Also please note that I am running on a 4GB of RAM and 2Cores server (the cheapest kimsufi server) but I don't think it is link. |
I believe I might have found the issue. I have been tracking the
The value is 1.27132 GB which according to postgres is bigger than max authorize. So we are hitting this message here: And it returns The maxLen value is define here: Solution |
I don't think I want to hardcode an internal constant into this library. It could be reasonable to mention this constraint in the copy in documentation. |
I understand that you don't want to hardcode value. I am however in favor of having it because it will make it fail early and help return a proper error message regarding the length of the buffer. Having it mentioned in the documentation won't be enough because of the confusing error message about |
The entire purpose of copy queries are to allow very large data imports to be handled in a streaming fashion to avoid buffering the entire thing in memory. As a result, I don't expect many people to be running into this limitation (which is probably why the Postgres backend doesn't try to send a nice error message). |
…mit (#15) This PR split the transactions copy in part to avoid hitting the limit of 1GB. We are creating an array of transactions COPY IN values and execute them by chunk of 1GB. This hard limit is find in postgres and cannot be configured (see the issue in rust-postgres sfackler/rust-postgres#986).
One year later I have faced this issue again. After some internet research, I have found this old issue I opened. I am again in favor of a hardcoded limit as it is in the postgres code to avoid the confusing error message. However adding it to the documentation it is a start and should be enough to close this issue. |
I am trying to COPY IN a huge amount of data but I keep getting this error. This is happening once I call
finish()
after awrite_all
.I can reproduce this systematically. I have no idea if the
invalid message length
is being caused by the client and then it crash.Error message
The text was updated successfully, but these errors were encountered: