summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBenjamin C Winston (Technical Operations) <bwinston@philasd.org>2023-05-30 12:22:23 -0400
committerKlemens Schölhorn <klemens.schoelhorn@advantest.com>2023-06-02 12:30:10 +0200
commit0a0efc1c69d79b10258f7f207b6cc8be6d2d5841 (patch)
tree77b1b26b118cab0aca4b64f1c4388bdcb85aa509
parent9fddb6e99fb981cd31eb8187dd2f47746b3625d8 (diff)
Add note about OpenSSH sftp's concurrent limit
-rw-r--r--paramiko/sftp_client.py10
-rw-r--r--paramiko/sftp_file.py10
2 files changed, 16 insertions, 4 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index a0d38bb9..8ebeb85e 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -783,7 +783,10 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
:param int max_concurrent_prefetch_requests:
The maximum number of concurrent read requests to prefetch.
When this is ``None`` (the default), do not limit the number of
- concurrent prefetch requests.
+ concurrent prefetch requests. Note: OpenSSH's sftp internally
+ imposes a limit of 64 concurrent requests, while Paramiko imposes
+ no limit by default; consider setting a limit if a file can be
+ successfully received with sftp but hangs with Paramiko.
:return: the `number <int>` of bytes written to the opened file object
.. versionadded:: 1.10
@@ -821,7 +824,10 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
:param int max_concurrent_prefetch_requests:
The maximum number of concurrent read requests to prefetch.
When this is ``None`` (the default), do not limit the number of
- concurrent prefetch requests.
+ concurrent prefetch requests. Note: OpenSSH's sftp internally
+ imposes a limit of 64 concurrent requests, while Paramiko imposes
+ no limit by default; consider setting a limit if a file can be
+ successfully received with sftp but hangs with Paramiko.
.. versionadded:: 1.4
.. versionchanged:: 1.7.4
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py
index 12861df7..86d9a560 100644
--- a/paramiko/sftp_file.py
+++ b/paramiko/sftp_file.py
@@ -457,7 +457,10 @@ class SFTPFile(BufferedFile):
:param int max_concurrent_requests:
The maximum number of concurrent read requests to prefetch.
When this is ``None`` (the default), do not limit the number of
- concurrent prefetch requests.
+ concurrent prefetch requests. Note: OpenSSH's sftp internally
+ imposes a limit of 64 concurrent requests, while Paramiko imposes
+ no limit by default; consider setting a limit if a file can be
+ successfully received with sftp but hangs with Paramiko.
.. versionadded:: 1.5.1
.. versionchanged:: 1.16.0
@@ -492,7 +495,10 @@ class SFTPFile(BufferedFile):
:param int max_concurrent_prefetch_requests:
The maximum number of concurrent read requests to prefetch.
When this is ``None`` (the default), do not limit the number of
- concurrent prefetch requests.
+ concurrent prefetch requests. Note: OpenSSH's sftp internally
+ imposes a limit of 64 concurrent requests, while Paramiko imposes
+ no limit by default; consider setting a limit if a file can be
+ successfully received with sftp but hangs with Paramiko.
:return: a list of blocks read, in the same order as in ``chunks``
.. versionadded:: 1.5.4