Increase default HTTP incoming connection queue

Based on the repo-discuss mailing list discussions [1] and [2], it seems
that the previous limit (50) was a bit low as default value.
It makes more sense to increase it and avoid people struggling to
understand the obscure Jetty exceptions thrown when the queue size is
too small.

If you have over 200 incoming requests queued, possibly there is
something more serious to investigate in Gerrit and thus makes sense to
avoid queueing them and consume incoming sockets and file-descriptors.

[1] https://groups.google.com/forum/#!topic/repo-discuss/-2hnEOqQA7M
[2] https://groups.google.com/forum/#!topic/repo-discuss/Fuk3GW0rcuU

Change-Id: Ifd1615c981ae33d460b178307257acd4e6722335
This commit is contained in:
Luca Milanesio 2015-09-04 07:56:00 -07:00
parent 586121a16e
commit 0ae62fedcf
2 changed files with 2 additions and 2 deletions

View File

@ -2201,7 +2201,7 @@ Maximum number of client connections which can enter the worker
thread pool waiting for a worker thread to become available.
0 sets the queue size to the Integer.MAX_VALUE.
+
By default 50.
By default 200.
[[httpd.maxWait]]httpd.maxWait::
+

View File

@ -353,7 +353,7 @@ public class JettyServer {
private ThreadPool threadPool(Config cfg) {
int maxThreads = cfg.getInt("httpd", null, "maxthreads", 25);
int minThreads = cfg.getInt("httpd", null, "minthreads", 5);
int maxQueued = cfg.getInt("httpd", null, "maxqueued", 50);
int maxQueued = cfg.getInt("httpd", null, "maxqueued", 200);
int idleTimeout = (int)MILLISECONDS.convert(60, SECONDS);
int maxCapacity = maxQueued == 0
? Integer.MAX_VALUE