Set sshd.threads to at least 4.
Otherwise, weird hangs can occur, for example when using Git LFS. See https://github.com/git-lfs/git-lfs/issues/3727 Change-Id: Ic19cb136bb37d62d8339b85c514c180f733e3465
This commit is contained in:

committed by
David Pursehouse

parent
e8810fbcb6
commit
2a389469be
@@ -4239,7 +4239,8 @@ Number of threads to use when executing SSH command requests.
|
||||
If additional requests are received while all threads are busy they
|
||||
are queued and serviced in a first-come-first-served order.
|
||||
+
|
||||
By default, 2x the number of CPUs available to the JVM.
|
||||
By default, 2x the number of CPUs available to the JVM (but at least 4
|
||||
threads).
|
||||
+
|
||||
[NOTE]
|
||||
When SSH daemon is enabled then this setting also defines the max number of
|
||||
|
@@ -28,7 +28,7 @@ public class ThreadSettingsConfig {
|
||||
@Inject
|
||||
ThreadSettingsConfig(@GerritServerConfig Config cfg) {
|
||||
int cores = Runtime.getRuntime().availableProcessors();
|
||||
sshdThreads = cfg.getInt("sshd", "threads", 2 * cores);
|
||||
sshdThreads = cfg.getInt("sshd", "threads", Math.max(4, 2 * cores));
|
||||
httpdMaxThreads = cfg.getInt("httpd", "maxThreads", 25);
|
||||
int defaultDatabasePoolLimit = sshdThreads + httpdMaxThreads + 2;
|
||||
databasePoolLimit = cfg.getInt("database", "poolLimit", defaultDatabasePoolLimit);
|
||||
|
Reference in New Issue
Block a user