由于客户端超出服务器的内部缓冲区,pysftp 下载失败
pysftp download fails because of client exceeded server's internal buffers
我只需要从 python 脚本下载一个文件,所以代码很简单:
import pysftp
sftp = pysftp.Connection('test_host','test',password='test')
sftp.get('testfile', 'c:\tmp\testfile3')
下载将开始并以正常速度进行几秒钟,然后停止。不再下载任何内容,几分钟后服务器关闭连接。
我正在连接的服务器的管理员不会透露 'security reasons' 服务器的任何详细信息,但写信给我说,在他这边,他可以看到这样的错误:
SFTP error sending, too many simultaneous client requests. Client has exceeded the server's internal buffers.
我可以根据 python 代码做些什么吗?
这是 post 中描述的 MAX_REQUEST_SIZE 问题的另一种表现形式:Paramiko Fails to download large files >1GB
所以我也在 sftp_file.py 中进行了更改:
MAX_REQUEST_SIZE = 32768
至
MAX_REQUEST_SIZE = 1024
神奇的是,问题似乎解决了。
我只需要从 python 脚本下载一个文件,所以代码很简单:
import pysftp
sftp = pysftp.Connection('test_host','test',password='test')
sftp.get('testfile', 'c:\tmp\testfile3')
下载将开始并以正常速度进行几秒钟,然后停止。不再下载任何内容,几分钟后服务器关闭连接。 我正在连接的服务器的管理员不会透露 'security reasons' 服务器的任何详细信息,但写信给我说,在他这边,他可以看到这样的错误:
SFTP error sending, too many simultaneous client requests. Client has exceeded the server's internal buffers.
我可以根据 python 代码做些什么吗?
这是 post 中描述的 MAX_REQUEST_SIZE 问题的另一种表现形式:Paramiko Fails to download large files >1GB
所以我也在 sftp_file.py 中进行了更改:
MAX_REQUEST_SIZE = 32768
至
MAX_REQUEST_SIZE = 1024
神奇的是,问题似乎解决了。