A Way to Increase Max Connection #13638

Open
opened 2026-02-22 00:09:59 -05:00 by deekerman · 7 comments
Owner

Originally created by @adamgwaps on GitHub (Jul 17, 2022).

Suggestion

i hope there is a way to increase max connection manually, i am seeding around 30k+ torrents and also downloading arount 10k+ and it seems no matter what the max connection always maxes at around 10k i run a direct connection with my ISP and i can have unlimited connection as long as my hardware(router) can handle it and mine can max at arount 500k connection.

Use case

more connections = more peers/leechers to connect to

Extra info/examples/attachments

manual toggle

Originally created by @adamgwaps on GitHub (Jul 17, 2022). ### Suggestion i hope there is a way to increase max connection manually, i am seeding around 30k+ torrents and also downloading arount 10k+ and it seems no matter what the max connection always maxes at around 10k i run a direct connection with my ISP and i can have unlimited connection as long as my hardware(router) can handle it and mine can max at arount 500k connection. ### Use case more connections = more peers/leechers to connect to ### Extra info/examples/attachments manual toggle
Author
Owner

@ghost commented on GitHub (Jul 23, 2022):

What happens if your untick the global max connection settings from GUI?

@ghost commented on GitHub (Jul 23, 2022): What happens if your untick the global max connection settings from GUI?
Author
Owner

@adamgwaps commented on GitHub (Jul 23, 2022):

oops yeah forgot to add that info, every setting related to limiting the connection has been unchecked and it seems 10,000-10,500 is the hard limit.

@adamgwaps commented on GitHub (Jul 23, 2022): oops yeah forgot to add that info, every setting related to limiting the connection has been unchecked and it seems 10,000-10,500 is the hard limit.
Author
Owner

@ghost commented on GitHub (Jul 23, 2022):

Which OS are you using? Does it limit applications to certain number of open file descriptors?

@ghost commented on GitHub (Jul 23, 2022): Which OS are you using? Does it limit applications to certain number of open file descriptors?
Author
Owner

@adamgwaps commented on GitHub (Jul 23, 2022):

Windows, no just the connection its hard limited to around 10k

@adamgwaps commented on GitHub (Jul 23, 2022): Windows, no just the connection its hard limited to around 10k
Author
Owner

@OpenSpaghettiSauce commented on GitHub (Oct 9, 2022):

tl;dr: You are hitting OS limits, not qBittorrent limits.

This is a limit imposed by libtorrent-rasterbar and it cannot be just fixed. It caps your connections at 10,000.
Unfortunately the link included in the source does not exist anymore.

But, if you google "Windows 10000 limit", you can find many explanations and articles. There is a handle limit at 10k.
So basically, each process is limited to 10k and thus, qBittorrent (which uses libtorrent-rasterbar), can't go above that limit.

You could run Linux (or BSD) to get around this limit.
Keep in mind that there are limits on Linux too, but you can change them.
Google "raise TCP connection limit Linux" to find out how.

The relevant source from libtorrent-rasterbar (platform_util.cpp):

int max_open_files()
	{
#if defined TORRENT_BUILD_SIMULATOR
		return 256;
#elif TORRENT_USE_RLIMIT

		int const inf = 10000000;

		struct rlimit rl{};
		if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
		{
			if (rl.rlim_cur == rlim_infinity) return inf;
			return rl.rlim_cur <= static_cast<rlim_t>(inf)
				? static_cast<int>(rl.rlim_cur) : inf;
		}
		return 1024;
#else
		// this seems like a reasonable limit for windows.
		// http://blogs.msdn.com/b/oldnewthing/archive/2007/07/18/3926581.aspx
		return 10000;
#endif
	}
@OpenSpaghettiSauce commented on GitHub (Oct 9, 2022): tl;dr: You are hitting OS limits, not qBittorrent limits. This is a limit imposed by libtorrent-rasterbar and it cannot be just fixed. It caps your connections at 10,000. Unfortunately the link included in the source does not exist anymore. But, if you google "Windows 10000 limit", you can find many explanations and articles. There is a handle limit at 10k. So basically, each process is limited to 10k and thus, qBittorrent (which uses libtorrent-rasterbar), can't go above that limit. You could run Linux (or BSD) to get around this limit. Keep in mind that there are limits on Linux too, but you can change them. Google "raise TCP connection limit Linux" to find out how. The relevant source from libtorrent-rasterbar (platform_util.cpp): ``` int max_open_files() { #if defined TORRENT_BUILD_SIMULATOR return 256; #elif TORRENT_USE_RLIMIT int const inf = 10000000; struct rlimit rl{}; if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { if (rl.rlim_cur == rlim_infinity) return inf; return rl.rlim_cur <= static_cast<rlim_t>(inf) ? static_cast<int>(rl.rlim_cur) : inf; } return 1024; #else // this seems like a reasonable limit for windows. // http://blogs.msdn.com/b/oldnewthing/archive/2007/07/18/3926581.aspx return 10000; #endif } ```
Author
Owner

@OpenSpaghettiSauce commented on GitHub (Oct 9, 2022):

One other alternative is running multiple qBittorrent instances. Theoretically, that could work. Someone on Discord was doing that just a while ago. You could use the portable version and normal version (that's 2), you could use the portable flag and set up multiple (no limit), or you could add more users to the PC, and run the other instances under those other users.

You can also run Docker on Windows (it utilizes Hyper-V), and then you could just spin up instances. Not sure if it's exempt from this limitation though. Just a few ideas. Unfortunately, there is no simple straightforward "fix" until Microsoft decides to change this limit.

@OpenSpaghettiSauce commented on GitHub (Oct 9, 2022): One other alternative is running multiple qBittorrent instances. Theoretically, that could work. Someone on Discord was doing that just a while ago. You could use the portable version and normal version (that's 2), you could use the portable flag and set up multiple (no limit), or you could add more users to the PC, and run the other instances under those other users. You can also run Docker on Windows (it utilizes Hyper-V), and then you could just spin up instances. Not sure if it's exempt from this limitation though. Just a few ideas. Unfortunately, there is no simple straightforward "fix" until Microsoft decides to change this limit.
Author
Owner

@xavier2k6 commented on GitHub (May 24, 2025):

ANNOUNCEMENT!

For anybody coming across this "Feature Request" & would like/love to see a potential implementation in the future!
Here are some options available to you:

  1. Please select/click the 👍 &/orreactions in the original/opening post of this ticket.

  2. Please feel free (If you have the "skillset") to create a "Pull Request" implementing what's being requested in this ticket.
    (new/existing contributors/developers are always welcome)


DO:

  • Provide constructive feedback.
  • Display how other projects implemented same/similar etc.

DO NOT:

  • Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s).
    (These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)
@xavier2k6 commented on GitHub (May 24, 2025): ## ANNOUNCEMENT! For anybody coming across this **_"Feature Request"_** & would like/love to see a potential implementation in the future! **Here are some options available to you:** 1. Please select/click the 👍 **&/or** ❤ `reactions` in the original/opening post of this ticket. 2. Please feel free _(If you have the "skillset")_ to create a **_"Pull Request"_** implementing what's being requested in this ticket. **_(new/existing contributors/developers are always welcome)_** ____ **DO:** * Provide constructive feedback. * Display how other projects implemented same/similar etc. **DO NOT:** * Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s). **(These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)**
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#13638
No description provided.