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

Client fix #37

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Client fix #37

wants to merge 6 commits into from

Conversation

Hujiabei1997
Copy link

@Hujiabei1997 Hujiabei1997 commented Nov 4, 2021

When using nfs-client to transfer a file greater than 1024 * 1024, the following error occurs:
Tcp IO error on the connection,the reason for this may be that the pipeline reader is closed, BROKEN PIPE error is generated, and Tcp IO error exception is thrown. Because the server source code is not clear, my guess about this problem is as follows:
In channel.write (), the CompositeChannelBuffer is sent as a message. The size of the message is limited to 1024 * 1024 on the server, while in NfsFileOutputStream, __ buffer_ is the byte array that actually stores the data (size 1024 * 1024), which must be filled before the data is sent.
But,message = metadata + data.
So one possibility is that the server limits the size of an overall message, while message contains metadata, so the actual data carried can only be less than 1024 * 1024.
So I think one way to solve bug is to adjust the default size of __ buffer_:
__ buffer = new byte [(int) Math.min (_ nfsFile.fsinfo () .getFsInfo () .wtpref, Integer.MAX_VALUE)-bufferSize]_.
Set aside some space for metadata storage to ensure that the whole message is not greater than 1024 * 1024

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

Successfully merging this pull request may close these issues.

1 participant