docs: move --max-connections documentation to the correct place

This commit is contained in:
Nick Craig-Wood 2025-05-06 15:23:13 +01:00
parent b160089be7
commit fe880c0fac
2 changed files with 29 additions and 23 deletions

View File

@ -1557,6 +1557,32 @@ Setting `--max-buffer-memory` allows the buffer memory to be
controlled so that it doesn't overwhelm the machine and allows controlled so that it doesn't overwhelm the machine and allows
`--transfers` to be set large. `--transfers` to be set large.
### --max-connections=N ###
This sets the maximum number of concurrent calls to the backend API.
It may not map 1:1 to TCP or HTTP connections depending on the backend
in use and the use of HTTP1 vs HTTP2.
When downloading files, backends only limit the initial opening of the
stream. The bulk data download is not counted as a connection. This
means that the `--max--connections` flag won't limit the total number
of downloads.
Note that it is possible to cause deadlocks with this setting so it
should be used with care.
If you are doing a sync or copy then make sure `--max-connections` is
one more than the sum of `--transfers` and `--checkers`.
If you use `--check-first` then `--max-connections` just needs to be
one more than the maximum of `--checkers` and `--transfers`.
So for `--max-connections 3` you'd use `--checkers 2 --transfers 2
--check-first` or `--checkers 1 --transfers 1`.
Setting this flag can be useful for backends which do multipart
uploads to limit the number of simultaneous parts being transferred.
### --max-delete=N ### ### --max-delete=N ###
This tells rclone not to delete more than N files. If that limit is This tells rclone not to delete more than N files. If that limit is

View File

@ -545,31 +545,11 @@ var ConfigOptionsInfo = Options{{
Help: "Add partial-suffix to temporary file name when --inplace is not used", Help: "Add partial-suffix to temporary file name when --inplace is not used",
Groups: "Copy", Groups: "Copy",
}, { }, {
Name: "max_connections", Name: "max_connections",
Help: strings.ReplaceAll(`Maximum number of simultaneous connections, 0 for unlimited. Help: "Maximum number of simultaneous backend API connections, 0 for unlimited.",
This sets the maximum number of connections made to the backend on a
per backend basis. Connections in this case are calls to the backend
API and may not map 1:1 to TCP or HTTP connections depending on the
backend in use.
Note that it is possible to cause deadlocks with this setting so it
should be used with care.
If you are doing a sync or copy then make sure |--max-connections| is
one more than the sum of |--transfers| and |--checkers|.
If you use |--check-first| then |--max-connections| just needs to be
one more than the maximum of |--checkers| and |--transfers|.
So for |--max-connections 3| you'd use |--checkers 2 --transfers 2
--check-first| or |--checkers 1 --transfers 1|.
Setting this flag can be useful for backends which do multipart
uploads or downloads to limit the number of total connections.
`, "|", "`"),
Default: 0, Default: 0,
Advanced: true, Advanced: true,
Groups: "Networking",
}} }}
// ConfigInfo is filesystem config options // ConfigInfo is filesystem config options